diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/debian/changelog cabal-install-head-2.5+git20181127.1.4ed0d54/debian/changelog --- cabal-install-head-2.5+git20181017.1.a4578fc/debian/changelog 2018-10-17 15:57:40.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/debian/changelog 2018-11-27 22:51:00.000000000 +0000 @@ -1,5 +1,5 @@ -cabal-install-head (2.5+git20181017.1.a4578fc-6~18.04) bionic; urgency=medium +cabal-install-head (2.5+git20181127.1.4ed0d54-6~18.04) bionic; urgency=medium * Initial release - -- Herbert Valerio Riedel Wed, 17 Oct 2018 17:57:40 +0200 + -- Herbert Valerio Riedel Tue, 27 Nov 2018 23:51:00 +0100 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/debian/control cabal-install-head-2.5+git20181127.1.4ed0d54/debian/control --- cabal-install-head-2.5+git20181017.1.a4578fc/debian/control 2018-10-17 15:56:49.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/debian/control 2018-11-27 22:50:17.000000000 +0000 @@ -2,7 +2,7 @@ Section: universe/haskell Priority: extra Maintainer: Herbert Valerio Riedel -Build-Depends: debhelper (>= 8.0.0), zlib1g-dev, ghc-8.2.2 +Build-Depends: debhelper (>= 8.0.0), zlib1g-dev, ghc-8.4.4 Standards-Version: 3.9.4 Homepage: http://www.haskell.org/ghc/ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/debian/rules cabal-install-head-2.5+git20181127.1.4ed0d54/debian/rules --- cabal-install-head-2.5+git20181017.1.a4578fc/debian/rules 2018-10-17 15:56:49.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/debian/rules 2018-11-27 22:50:17.000000000 +0000 @@ -6,7 +6,7 @@ dh $@ override_dh_auto_install: - PATH=/opt/ghc/8.2.2/bin:$$PATH PREFIX=$(CURDIR)/debian/cabal-install-head/opt/cabal/head $(CURDIR)/build.sh + PATH=/opt/ghc/8.4.4/bin:$$PATH PREFIX=$(CURDIR)/debian/cabal-install-head/opt/cabal/head $(CURDIR)/build.sh mkdir -p $(CURDIR)/debian/cabal-install-head/opt/ghc/bin mkdir -p $(CURDIR)/debian/cabal-install-head/opt/cabal/bin rm -rf $(CURDIR)/debian/cabal-install-head/opt/cabal/head/lib diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/buildplan.lst cabal-install-head-2.5+git20181127.1.4ed0d54/src/buildplan.lst --- cabal-install-head-2.5+git20181017.1.a4578fc/src/buildplan.lst 2018-10-17 15:56:34.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/buildplan.lst 2018-11-27 22:50:03.000000000 +0000 @@ -5,13 +5,13 @@ echo-0.1.3 ed25519-0.0.5.0 mtl-2.2.2 -network-2.7.0.2 +network-2.8.0.0 random-1.1 stm-2.5.0.0 tar-0.5.1.0 text-1.2.3.1 zlib-0.6.2 -resolv-0.1.1.1 +resolv-0.1.1.2 edit-distance-0.2.2.1 parsec-3.1.13.0 hashable-1.2.7.0 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Cabal.cabal cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Cabal.cabal --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Cabal.cabal 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Cabal.cabal 2018-11-27 22:49:58.000000000 +0000 @@ -191,7 +191,7 @@ filepath >= 1.3.0.1 && < 1.5, pretty >= 1.1.1 && < 1.2, process >= 1.1.0.2 && < 1.7, - time >= 1.4.0.1 && < 1.9 + time >= 1.4.0.1 && < 1.10 if flag(bundled-binary-generic) build-depends: binary >= 0.5.1.1 && < 0.7 @@ -343,6 +343,7 @@ Distribution.Types.ModuleReexport Distribution.Types.ModuleRenaming Distribution.Types.ComponentName + Distribution.Types.LibraryName Distribution.Types.MungedPackageName Distribution.Types.PackageName Distribution.Types.PkgconfigName @@ -367,6 +368,8 @@ Distribution.Types.Version Distribution.Types.VersionRange Distribution.Types.VersionInterval + Distribution.Types.GivenComponent + Distribution.Types.PackageVersionConstraint Distribution.Utils.Generic Distribution.Utils.NubList Distribution.Utils.ShortText diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/ChangeLog.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/ChangeLog.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/ChangeLog.md 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/ChangeLog.md 2018-11-27 22:49:58.000000000 +0000 @@ -1,5 +1,11 @@ # 2.6.0.0 (current development version) * TODO + * 'check' reports warnings for various ghc-\*-options fields separately + ([#5342](https://github.com/haskell/cabal/issues/5432)). + * `KnownExtension`: added new extension `DerivingVia`. + * `KnownExtension`: added new extension `DerivingVia` + * Add `extra-dynamic-library-flavours`, to specify extra dynamic library + flavours to build and install from a .cabal file. ---- diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ComponentsGraph.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ComponentsGraph.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ComponentsGraph.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ComponentsGraph.hs 2018-11-27 22:49:57.000000000 +0000 @@ -20,8 +20,7 @@ import Distribution.Compat.Graph (Graph, Node(..)) import qualified Distribution.Compat.Graph as Graph -import Distribution.Text - ( Text(disp) ) +import Distribution.Pretty (pretty) import Text.PrettyPrint ------------------------------------------------------------------------------ @@ -42,8 +41,8 @@ -- dispComponentsWithDeps :: ComponentsWithDeps -> Doc dispComponentsWithDeps graph = - vcat [ hang (text "component" <+> disp (componentName c)) 4 - (vcat [ text "dependency" <+> disp cdep | cdep <- cdeps ]) + vcat [ hang (text "component" <+> pretty (componentName c)) 4 + (vcat [ text "dependency" <+> pretty cdep | cdep <- cdeps ]) | (c, cdeps) <- graph ] -- | Create a 'Graph' of 'Component', or report a cycle if there is a @@ -66,9 +65,9 @@ (CExeName <$> getAllInternalToolDependencies pkg_descr bi) ++ [ if pkgname == packageName pkg_descr - then CLibName - else CSubLibName toolname - | Dependency pkgname _ <- targetBuildDepends bi + then CLibName LMainLibName + else CLibName (LSubLibName toolname) + | Dependency pkgname _ _ <- targetBuildDepends bi , let toolname = packageNameToUnqualComponentName pkgname , toolname `elem` internalPkgDeps ] where diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ConfiguredComponent.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ConfiguredComponent.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ConfiguredComponent.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ConfiguredComponent.hs 2018-11-27 22:49:57.000000000 +0000 @@ -30,6 +30,7 @@ import Distribution.Types.PackageName import Distribution.Types.Mixin import Distribution.Types.ComponentName +import Distribution.Types.LibraryName import Distribution.Types.UnqualComponentName import Distribution.Types.ComponentInclude import Distribution.Package @@ -45,7 +46,7 @@ import Control.Monad import qualified Data.Set as Set import qualified Data.Map as Map -import Distribution.Text +import Distribution.Pretty import Text.PrettyPrint -- | A configured component, we know exactly what its 'ComponentId' is, @@ -91,8 +92,8 @@ -- | Pretty-print a 'ConfiguredComponent'. dispConfiguredComponent :: ConfiguredComponent -> Doc dispConfiguredComponent cc = - hang (text "component" <+> disp (cc_cid cc)) 4 - (vcat [ hsep $ [ text "include", disp (ci_id incl), disp (ci_renaming incl) ] + hang (text "component" <+> pretty (cc_cid cc)) 4 + (vcat [ hsep $ [ text "include", pretty (ci_id incl), pretty (ci_renaming incl) ] | incl <- cc_includes cc ]) @@ -115,7 +116,7 @@ Nothing -> dieProgress $ text "Mix-in refers to non-existent package" <+> - quotes (disp name) $$ + quotes (pretty name) $$ text "(did you forget to add the package to build-depends?)" Just r -> return r return ComponentInclude { @@ -150,7 +151,7 @@ bi = componentBuildInfo component deps_map = Map.fromList [ ((packageName dep, ann_cname dep), dep) | dep <- lib_deps ] - is_public = componentName component == CLibName + is_public = componentName component == CLibName LMainLibName type ConfiguredComponentMap = Map PackageName (Map ComponentName (AnnotatedId ComponentId)) @@ -165,16 +166,28 @@ toConfiguredComponent pkg_descr this_cid lib_dep_map exe_dep_map component = do lib_deps <- if newPackageDepsBehaviour pkg_descr - then forM (targetBuildDepends bi) $ \(Dependency name _) -> do - let (pn, cn) = fixFakePkgName pkg_descr name - value <- case Map.lookup cn =<< Map.lookup pn lib_dep_map of + then fmap concat $ forM (targetBuildDepends bi) $ \(Dependency name _ sublibs) -> do + -- The package name still needs fixing in case of legacy + -- sublibrary dependency syntax + let (pn, _) = fixFakePkgName pkg_descr name + pkg <- case Map.lookup pn lib_dep_map of Nothing -> dieProgress $ - text "Dependency on unbuildable (i.e. 'buildable: False')" <+> - text (showComponentName cn) <+> - text "from" <+> disp pn - Just v -> return v - return value + text "Dependency on unbuildable" <+> + text "package" <+> pretty pn + Just p -> return p + -- Return all library components + forM (Set.toList sublibs) $ \lib -> + let comp = CLibName lib in + case Map.lookup (CLibName $ LSubLibName $ packageNameToUnqualComponentName name) pkg + <|> Map.lookup comp pkg + of + Nothing -> + dieProgress $ + text "Dependency on unbuildable" <+> + text (showLibraryName lib) <+> + text "from" <+> pretty pn + Just v -> return v else return old_style_lib_deps mkConfiguredComponent pkg_descr this_cid @@ -192,7 +205,7 @@ | (pn, comp_map) <- Map.toList lib_dep_map , pn /= packageName pkg_descr , (cn, e) <- Map.toList comp_map - , cn == CLibName ] + , cn == CLibName LMainLibName ] -- We have to nub here, because 'getAllToolDependencies' may return -- duplicates (see #4986). (NB: This is not needed for lib_deps, -- since those elaborate into includes, for which there explicitly @@ -293,11 +306,13 @@ -- and internal libraries are specified the same. For now, we assume internal -- libraries shadow, and this function disambiguates accordingly, but soon the -- underlying ambiguity will be addressed. +-- Multiple public libraries (cabal 3.0) added an unambiguous way of specifying +-- sublibraries, but we still have to support the old syntax for bc reasons. fixFakePkgName :: PackageDescription -> PackageName -> (PackageName, ComponentName) fixFakePkgName pkg_descr pn = if subLibName `elem` internalLibraries - then (packageName pkg_descr, CSubLibName subLibName) - else (pn, CLibName) + then (packageName pkg_descr, CLibName (LSubLibName subLibName)) + else (pn, CLibName LMainLibName ) where subLibName = packageNameToUnqualComponentName pn internalLibraries = mapMaybe libName (allLibraries pkg_descr) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/Configure.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/Configure.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/Configure.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/Configure.hs 2018-11-27 22:49:57.000000000 +0000 @@ -50,7 +50,7 @@ ( lefts ) import qualified Data.Set as Set import qualified Data.Map as Map -import Distribution.Text +import Distribution.Pretty import Text.PrettyPrint ------------------------------------------------------------------------------ @@ -105,7 +105,7 @@ | Just pkg <- PackageIndex.lookupUnitId installedPackageSet uid = FullUnitId (Installed.installedComponentId pkg) (Map.fromList (Installed.instantiatedWith pkg)) - | otherwise = error ("uid_lookup: " ++ display uid) + | otherwise = error ("uid_lookup: " ++ prettyShow uid) where uid = unDefUnitId def_uid graph2 <- toLinkedComponents verbosity uid_lookup (package pkg_descr) shape_pkg_map graph1 @@ -186,14 +186,14 @@ ++ "packages must be rebuilt before they can be used.\n" -- TODO: Undupe. ++ unlines [ "installed package " - ++ display (packageId pkg) + ++ prettyShow (packageId pkg) ++ " is broken due to missing package " - ++ intercalate ", " (map display deps) + ++ intercalate ", " (map prettyShow deps) | (Left pkg, deps) <- broken ] ++ unlines [ "planned package " - ++ display (packageId pkg) + ++ prettyShow (packageId pkg) ++ " is broken due to missing package " - ++ intercalate ", " (map display deps) + ++ intercalate ", " (map prettyShow deps) | (Right pkg, deps) <- broken ] -- In this section, we'd like to look at the 'packageDependsIndex' @@ -224,9 +224,9 @@ warnProgress $ hang (text "This package indirectly depends on multiple versions of the same" <+> text "package. This is very likely to cause a compile failure.") 2 - (vcat [ text "package" <+> disp (packageName user) <+> - parens (disp (installedUnitId user)) <+> text "requires" <+> - disp inst + (vcat [ text "package" <+> pretty (packageName user) <+> + parens (pretty (installedUnitId user)) <+> text "requires" <+> + pretty inst | (_dep_key, insts) <- inconsistencies , (inst, users) <- insts , user <- users ]) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/DescribeUnitId.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/DescribeUnitId.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/DescribeUnitId.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/DescribeUnitId.hs 2018-11-27 22:49:57.000000000 +0000 @@ -1,17 +1,17 @@ -{-# LANGUAGE Rank2Types #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE Rank2Types #-} module Distribution.Backpack.DescribeUnitId where -import Prelude () import Distribution.Compat.Prelude +import Prelude () -import Distribution.Types.PackageId -import Distribution.Types.ComponentName import Distribution.Compat.Stack -import Distribution.Verbosity import Distribution.ModuleName -import Distribution.Text +import Distribution.Pretty import Distribution.Simple.Utils +import Distribution.Types.ComponentName +import Distribution.Types.PackageId +import Distribution.Verbosity import Text.PrettyPrint @@ -37,7 +37,7 @@ -- for (2) which component (with enough details to uniquely identify -- the build in question.) -- -setupMessage' :: Text a => Verbosity +setupMessage' :: Pretty a => Verbosity -> String -- ^ Operation being done (capitalized), on: -> PackageIdentifier -- ^ Package -> ComponentName -- ^ Component name @@ -50,7 +50,7 @@ case mb_insts of Just insts | not (null insts) -> hang (msg_doc <+> text "instantiated with") 2 - (vcat [ disp k <+> text "=" <+> disp v + (vcat [ pretty k <+> text "=" <+> pretty v | (k,v) <- insts ]) $$ for_doc _ -> @@ -58,4 +58,4 @@ where msg_doc = text msg <+> text (showComponentName cname) - for_doc = text "for" <+> disp pkgid <<>> text ".." + for_doc = text "for" <+> pretty pkgid <<>> text ".." diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/Id.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/Id.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/Id.hs 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/Id.hs 2018-11-27 22:49:58.000000000 +0000 @@ -24,8 +24,9 @@ import Distribution.Utils.Base62 import Distribution.Version -import Distribution.Text - ( display, simpleParse ) +import Distribution.Pretty + ( prettyShow ) +import Distribution.Parsec.Class ( simpleParsec ) -- | This method computes a default, "good enough" 'ComponentId' -- for a package. The intent is that cabal-install (or the user) will @@ -50,11 +51,11 @@ -- For safety, include the package + version here -- for GHC 7.10, where just the hash is used as -- the package key - ( display pid + ( prettyShow pid ++ show dep_ipids ++ show flags ) | otherwise = "" - generated_base = display pid ++ hash_suffix + generated_base = prettyShow pid ++ hash_suffix explicit_base cid0 = fromPathTemplate (InstallDirs.substPathTemplate env (toPathTemplate cid0)) -- Hack to reuse install dirs machinery @@ -62,7 +63,7 @@ where env = packageTemplateEnv pid (mkUnitId "") actual_base = case mb_ipid of Flag ipid0 -> explicit_base ipid0 - NoFlag | deterministic -> display pid + NoFlag | deterministic -> prettyShow pid | otherwise -> generated_base in case mb_cid of Flag cid -> cid @@ -126,15 +127,15 @@ -> String computeCompatPackageKey comp pkg_name pkg_version uid | not (packageKeySupported comp) = - display pkg_name ++ "-" ++ display pkg_version + prettyShow pkg_name ++ "-" ++ prettyShow pkg_version | not (unifiedIPIDRequired comp) = let str = unUnitId uid -- assume no Backpack support mb_verbatim_key - = case simpleParse str :: Maybe PackageId of + = case simpleParsec str :: Maybe PackageId of -- Something like 'foo-0.1', use it verbatim. -- (NB: hash tags look like tags, so they are parsed, -- so the extra equality check tests if a tag was dropped.) - Just pid0 | display pid0 == str -> Just str + Just pid0 | prettyShow pid0 == str -> Just str _ -> Nothing mb_truncated_key = let cand = reverse (takeWhile isAlphaNum (reverse str)) @@ -143,4 +144,4 @@ else Nothing rehashed_key = hashToBase62 str in fromMaybe rehashed_key (mb_verbatim_key `mplus` mb_truncated_key) - | otherwise = display uid + | otherwise = prettyShow uid diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/LinkedComponent.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/LinkedComponent.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/LinkedComponent.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/LinkedComponent.hs 2018-11-27 22:49:57.000000000 +0000 @@ -45,8 +45,7 @@ import qualified Data.Map as Map import Data.Traversable ( mapM ) -import Distribution.Text - ( Text(disp) ) +import Distribution.Pretty (pretty) import Text.PrettyPrint import Data.Either @@ -104,11 +103,11 @@ dispLinkedComponent :: LinkedComponent -> Doc dispLinkedComponent lc = - hang (text "unit" <+> disp (lc_uid lc)) 4 $ - vcat [ text "include" <+> disp (ci_id incl) <+> disp (ci_renaming incl) + hang (text "unit" <+> pretty (lc_uid lc)) 4 $ + vcat [ text "include" <+> pretty (ci_id incl) <+> pretty (ci_renaming incl) | incl <- lc_includes lc ] $+$ - vcat [ text "signature include" <+> disp (ci_id incl) + vcat [ text "signature include" <+> pretty (ci_id incl) | incl <- lc_sig_includes lc ] $+$ dispOpenModuleSubst (modShapeProvides (lc_shape lc)) @@ -230,7 +229,7 @@ when (not (Set.null reqs) && isNotLib component) $ dieProgress $ hang (text "Non-library component has unfilled requirements:") - 4 (vcat [disp req | req <- Set.toList reqs]) + 4 (vcat [pretty req | req <- Set.toList reqs]) -- NB: do NOT include hidden modules here: GHC 7.10's ghc-pkg -- won't allow it (since someone could directly synthesize @@ -285,7 +284,7 @@ let build_reexports m (k, v) | Map.member k m = dieProgress $ hsep - [ text "Module name ", disp k, text " is exported multiple times." ] + [ text "Module name ", pretty k, text " is exported multiple times." ] | otherwise = return (Map.insert k v m) provs <- foldM build_reexports Map.empty $ -- TODO: doublecheck we have checked for @@ -364,17 +363,17 @@ brokenReexportMsg :: ModuleReexport -> Doc brokenReexportMsg (ModuleReexport (Just pn) from _to) = - vcat [ text "The package" <+> quotes (disp pn) - , text "does not export a module" <+> quotes (disp from) ] + vcat [ text "The package" <+> quotes (pretty pn) + , text "does not export a module" <+> quotes (pretty from) ] brokenReexportMsg (ModuleReexport Nothing from _to) = - vcat [ text "The module" <+> quotes (disp from) + vcat [ text "The module" <+> quotes (pretty from) , text "is not exported by any suitable package." , text "It occurs in neither the 'exposed-modules' of this package," , text "nor any of its 'build-depends' dependencies." ] ambiguousReexportMsg :: ModuleReexport -> ModuleWithSource -> [ModuleWithSource] -> Doc ambiguousReexportMsg (ModuleReexport mb_pn from _to) y1 ys = - vcat [ text "Ambiguous reexport" <+> quotes (disp from) + vcat [ text "Ambiguous reexport" <+> quotes (pretty from) , hang (text "It could refer to either:") 2 (vcat (msg : msgs)) , help_msg mb_pn ] @@ -393,7 +392,7 @@ , text "mixins field to rename one of the module" , text "names differently." ] displayModuleWithSource y - = vcat [ quotes (disp (unWithSource y)) + = vcat [ quotes (pretty (unWithSource y)) , text "brought into scope by" <+> dispModuleSource (getSource y) ] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/MixLink.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/MixLink.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/MixLink.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/MixLink.hs 2018-11-27 22:49:58.000000000 +0000 @@ -14,7 +14,7 @@ import qualified Distribution.Utils.UnionFind as UnionFind import Distribution.ModuleName -import Distribution.Text +import Distribution.Pretty import Distribution.Types.ComponentId import Text.PrettyPrint @@ -56,10 +56,10 @@ Just () -> return () Nothing -> do addErr $ - text "Ambiguous module" <+> quotes (disp mod_name) $$ + text "Ambiguous module" <+> quotes (pretty mod_name) $$ text "It could refer to" <+> - ( text " " <+> (quotes (disp mod) $$ in_scope_by (getSource prov)) $$ - text "or" <+> (quotes (disp mod') $$ in_scope_by (getSource prov')) ) $$ + ( text " " <+> (quotes (pretty mod) $$ in_scope_by (getSource prov)) $$ + text "or" <+> (quotes (pretty mod') $$ in_scope_by (getSource prov')) ) $$ link_doc mod <- convertModuleU (unWithSource prov) req_mod <- convertModuleU (unWithSource req) @@ -67,7 +67,7 @@ case mod of OpenModule (IndefFullUnitId cid _) _ | cid == self_cid -> addErr $ - text "Cannot instantiate requirement" <+> quotes (disp mod_name) <+> + text "Cannot instantiate requirement" <+> quotes (pretty mod_name) <+> in_scope_by (getSource req) $$ text "with locally defined module" <+> in_scope_by (getSource prov) $$ text "as this would create a cyclic dependency, which GHC does not support." $$ @@ -79,9 +79,9 @@ Just () -> return () Nothing -> do -- TODO: Record and report WHERE the bad constraint came from - addErr $ text "Could not instantiate requirement" <+> quotes (disp mod_name) $$ - nest 4 (text "Expected:" <+> disp mod $$ - text "Actual: " <+> disp req_mod) $$ + addErr $ text "Could not instantiate requirement" <+> quotes (pretty mod_name) $$ + nest 4 (text "Expected:" <+> pretty mod $$ + text "Actual: " <+> pretty req_mod) $$ parens (text "This can occur if an exposed module of" <+> text "a libraries shares a name with another module.") $$ link_doc @@ -90,7 +90,7 @@ unify s1 s2 = tryM $ addErrContext short_link_doc $ unifyModule (unWithSource s1) (unWithSource s2) in_scope_by s = text "brought into scope by" <+> dispModuleSource s - short_link_doc = text "While filling requirement" <+> quotes (disp mod_name) + short_link_doc = text "While filling requirement" <+> quotes (pretty mod_name) link_doc = text "While filling requirements of" <+> reqs_doc reqs_doc | null reqs = dispModuleSource (getSource req) @@ -117,8 +117,8 @@ | u1 == u2 -> return () | otherwise -> failWith $ hang (text "Couldn't match unit IDs:") 4 - (text " " <+> disp u1 $$ - text "and" <+> disp u2) + (text " " <+> pretty u1 $$ + text "and" <+> pretty u2) (UnitIdThunkU uid1, UnitIdU _ cid2 insts2) -> unifyThunkWith cid2 insts2 uid2_u uid1 uid1_u (UnitIdU _ cid1 insts1, UnitIdThunkU uid2) @@ -151,8 +151,8 @@ -- easier to understand error message. failWith $ hang (text "Couldn't match component IDs:") 4 - (text " " <+> disp cid1 $$ - text "and" <+> disp cid2) + (text " " <+> pretty cid1 $$ + text "and" <+> pretty cid2) -- The KEY STEP which makes this a Huet-style unification -- algorithm. (Also a payoff of using union-find.) -- We can build infinite unit IDs this way, which is necessary @@ -176,8 +176,8 @@ when (mod_name1 /= mod_name2) $ failWith $ hang (text "Cannot match module names") 4 $ - text " " <+> disp mod_name1 $$ - text "and" <+> disp mod_name2 + text " " <+> pretty mod_name1 $$ + text "and" <+> pretty mod_name2 -- NB: this is not actually necessary (because we'll -- detect loops eventually in 'unifyUnitId'), but it -- seems harmless enough diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ModuleScope.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ModuleScope.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ModuleScope.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ModuleScope.hs 2018-11-27 22:49:58.000000000 +0000 @@ -23,10 +23,11 @@ import Distribution.Types.IncludeRenaming import Distribution.Types.PackageName import Distribution.Types.ComponentName +import Distribution.Types.LibraryName +import Distribution.Pretty import Distribution.Backpack import Distribution.Backpack.ModSubst -import Distribution.Text import qualified Data.Map as Map import Text.PrettyPrint @@ -96,15 +97,15 @@ -- TODO: Deduplicate this with Distribution.Backpack.UnifyM.ci_msg dispModuleSource :: ModuleSource -> Doc dispModuleSource (FromMixins pn cn incls) - = text "mixins:" <+> dispComponent pn cn <+> disp incls + = text "mixins:" <+> dispComponent pn cn <+> pretty incls dispModuleSource (FromBuildDepends pn cn) = text "build-depends:" <+> dispComponent pn cn dispModuleSource (FromExposedModules m) - = text "exposed-modules:" <+> disp m + = text "exposed-modules:" <+> pretty m dispModuleSource (FromOtherModules m) - = text "other-modules:" <+> disp m + = text "other-modules:" <+> pretty m dispModuleSource (FromSignatures m) - = text "signatures:" <+> disp m + = text "signatures:" <+> pretty m -- Dependency dispComponent :: PackageName -> ComponentName -> Doc @@ -113,10 +114,10 @@ -- should be clear enough. To do source syntax, we'd -- need to know what the package we're linking is. case cn of - CLibName -> disp pn - CSubLibName ucn -> disp pn <<>> colon <<>> disp ucn + CLibName LMainLibName -> pretty pn + CLibName (LSubLibName ucn) -> pretty pn <<>> colon <<>> pretty ucn -- Case below shouldn't happen - _ -> disp pn <+> parens (disp cn) + _ -> pretty pn <+> parens (pretty cn) -- | An 'OpenModule', annotated with where it came from in a Cabal file. data WithSource a = WithSource ModuleSource a diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ReadyComponent.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ReadyComponent.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/ReadyComponent.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/ReadyComponent.hs 2018-11-27 22:49:58.000000000 +0000 @@ -25,6 +25,7 @@ import Distribution.Types.ComponentInclude import Distribution.Types.ComponentId import Distribution.Types.ComponentName +import Distribution.Types.LibraryName import Distribution.Types.PackageId import Distribution.Types.UnitId import Distribution.Compat.Graph (IsNode(..)) @@ -45,7 +46,7 @@ import qualified Data.Map as Map import Distribution.Version -import Distribution.Text +import Distribution.Pretty -- | A 'ReadyComponent' is one that we can actually generate build -- products for. We have a ready component for the typecheck-only @@ -134,15 +135,15 @@ (instc_includes instc) ++ instc_insts_deps instc where - toMungedPackageId :: Text id => ComponentInclude id rn -> MungedPackageId + toMungedPackageId :: Pretty id => ComponentInclude id rn -> MungedPackageId toMungedPackageId ci = computeCompatPackageId (ci_pkgid ci) (case ci_cname ci of - CLibName -> Nothing - CSubLibName uqn -> Just uqn - _ -> error $ display (rc_cid rc) ++ - " depends on non-library " ++ display (ci_id ci)) + CLibName LMainLibName -> Nothing + CLibName (LSubLibName uqn) -> Just uqn + _ -> error $ prettyShow (rc_cid rc) ++ + " depends on non-library " ++ prettyShow (ci_id ci)) -- | Get the 'MungedPackageId' of a 'ReadyComponent' IF it is -- a library. @@ -178,9 +179,9 @@ hang (text (case rc_i rc of Left _ -> "indefinite" Right _ -> "definite") - <+> disp (nodeKey rc) + <+> pretty (nodeKey rc) {- <+> dispModSubst (Map.fromList (lc_insts lc)) -} ) 4 $ - vcat [ text "depends" <+> disp uid + vcat [ text "depends" <+> pretty uid | uid <- nodeNeighbors rc ] -- | The state of 'InstM'; a mapping from 'UnitId's to their diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/UnifyM.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/UnifyM.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Backpack/UnifyM.hs 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Backpack/UnifyM.hs 2018-11-27 22:49:58.000000000 +0000 @@ -56,7 +56,7 @@ import Distribution.ModuleName import Distribution.Package import Distribution.PackageDescription -import Distribution.Text +import Distribution.Pretty import Distribution.Types.IncludeRenaming import Distribution.Types.ComponentInclude import Distribution.Types.AnnotatedId @@ -436,15 +436,15 @@ ci_msg :: ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming -> Doc ci_msg ci | ci_implicit ci = text "build-depends:" <+> pp_pn - | otherwise = text "mixins:" <+> pp_pn <+> disp (ci_renaming ci) + | otherwise = text "mixins:" <+> pp_pn <+> pretty (ci_renaming ci) where pn = pkgName (ci_pkgid ci) pp_pn = case ci_cname ci of - CLibName -> disp pn - CSubLibName cn -> disp pn <<>> colon <<>> disp cn + CLibName LMainLibName -> pretty pn + CLibName (LSubLibName cn) -> pretty pn <<>> colon <<>> pretty cn -- Shouldn't happen - cn -> disp pn <+> parens (disp cn) + cn -> pretty pn <+> parens (pretty cn) -- | Convert a 'ModuleShape' into a 'ModuleScopeU', so we can do -- unification on it. @@ -505,8 +505,8 @@ [] -> error "req_rename" [v] -> return v v:vs -> do addErr $ - text "Conflicting renamings of requirement" <+> quotes (disp k) $$ - text "Renamed to: " <+> vcat (map disp (v:vs)) + text "Conflicting renamings of requirement" <+> quotes (pretty k) $$ + text "Renamed to: " <+> vcat (map pretty (v:vs)) return v let req_rename_fn k = case Map.lookup k req_rename of @@ -536,9 +536,9 @@ unless (Set.null leftover) $ addErr $ hang (text "The" <+> text (showComponentName compname) <+> - text "from package" <+> quotes (disp pid) + text "from package" <+> quotes (pretty pid) <+> text "does not require:") 4 - (vcat (map disp (Set.toList leftover))) + (vcat (map pretty (Set.toList leftover))) -- Provision computation is more complex. -- For example, if we have: @@ -576,8 +576,8 @@ [ case Map.lookup from provs of Just m -> return (to, m) Nothing -> failWith $ - text "Package" <+> quotes (disp pid) <+> - text "does not expose the module" <+> quotes (disp from) + text "Package" <+> quotes (pretty pid) <+> + text "does not expose the module" <+> quotes (pretty from) | (from, to) <- rns ] return (r, prov_rns) let prov_scope = modSubst req_subst diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/CabalSpecVersion.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/CabalSpecVersion.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/CabalSpecVersion.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/CabalSpecVersion.hs 2018-11-27 22:49:57.000000000 +0000 @@ -4,73 +4,88 @@ import Prelude () import Distribution.Compat.Prelude -import qualified Data.Set as Set -- | Different Cabal-the-spec versions. -- -- We branch based on this at least in the parser. -- data CabalSpecVersion - = CabalSpecOld + = CabalSpecV1_0 -- ^ this is older than 'CabalSpecV1_2' + | CabalSpecV1_2 -- ^ new syntax (sections) + | CabalSpecV1_4 + | CabalSpecV1_6 + | CabalSpecV1_8 + | CabalSpecV1_10 + | CabalSpecV1_12 + -- 1.16 -- 1.14: no changes + | CabalSpecV1_18 + | CabalSpecV1_20 | CabalSpecV1_22 | CabalSpecV1_24 | CabalSpecV2_0 | CabalSpecV2_2 | CabalSpecV2_4 + | CabalSpecV3_0 deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic) +-- | Show cabal spec version, but not the way in the .cabal files +-- +-- @since 3.0.0.0 +showCabalSpecVersion :: CabalSpecVersion -> String +showCabalSpecVersion CabalSpecV3_0 = "3.0" +showCabalSpecVersion CabalSpecV2_4 = "2.4" +showCabalSpecVersion CabalSpecV2_2 = "2.2" +showCabalSpecVersion CabalSpecV2_0 = "2.0" +showCabalSpecVersion CabalSpecV1_24 = "1.24" +showCabalSpecVersion CabalSpecV1_22 = "1.22" +showCabalSpecVersion CabalSpecV1_20 = "1.20" +showCabalSpecVersion CabalSpecV1_18 = "1.18" +showCabalSpecVersion CabalSpecV1_12 = "1.12" +showCabalSpecVersion CabalSpecV1_10 = "1.10" +showCabalSpecVersion CabalSpecV1_8 = "1.8" +showCabalSpecVersion CabalSpecV1_6 = "1.6" +showCabalSpecVersion CabalSpecV1_4 = "1.4" +showCabalSpecVersion CabalSpecV1_2 = "1.2" +showCabalSpecVersion CabalSpecV1_0 = "1.0" + cabalSpecLatest :: CabalSpecVersion -cabalSpecLatest = CabalSpecV2_4 +cabalSpecLatest = CabalSpecV3_0 -cabalSpecFeatures :: CabalSpecVersion -> Set.Set CabalFeature -cabalSpecFeatures CabalSpecOld = Set.empty -cabalSpecFeatures CabalSpecV1_22 = Set.empty -cabalSpecFeatures CabalSpecV1_24 = Set.empty -cabalSpecFeatures CabalSpecV2_0 = Set.empty -cabalSpecFeatures CabalSpecV2_2 = Set.fromList - [ Elif - , CommonStanzas - ] -cabalSpecFeatures CabalSpecV2_4 = Set.fromList - [ Elif - , CommonStanzas - , Globstar - ] - -cabalSpecSupports :: CabalSpecVersion -> [Int] -> Bool -cabalSpecSupports CabalSpecOld v = v < [1,21] -cabalSpecSupports CabalSpecV1_22 v = v < [1,23] -cabalSpecSupports CabalSpecV1_24 v = v < [1,25] -cabalSpecSupports CabalSpecV2_0 v = v < [2,1] -cabalSpecSupports CabalSpecV2_2 v = v < [2,3] -cabalSpecSupports CabalSpecV2_4 _ = True +cabalSpecFromVersionDigits :: [Int] -> CabalSpecVersion +cabalSpecFromVersionDigits v + | v >= [2,5] = CabalSpecV3_0 + | v >= [2,3] = CabalSpecV2_4 + | v >= [2,1] = CabalSpecV2_2 + | v >= [1,25] = CabalSpecV2_0 + | v >= [1,23] = CabalSpecV1_24 + | v >= [1,21] = CabalSpecV1_22 + | v >= [1,19] = CabalSpecV1_20 + | v >= [1,17] = CabalSpecV1_18 + | v >= [1,11] = CabalSpecV1_12 + | v >= [1,9] = CabalSpecV1_10 + | v >= [1,7] = CabalSpecV1_8 + | v >= [1,5] = CabalSpecV1_6 + | v >= [1,3] = CabalSpecV1_4 + | v >= [1,1] = CabalSpecV1_2 + | otherwise = CabalSpecV1_0 specHasCommonStanzas :: CabalSpecVersion -> HasCommonStanzas -specHasCommonStanzas CabalSpecV2_2 = HasCommonStanzas -specHasCommonStanzas CabalSpecV2_4 = HasCommonStanzas -specHasCommonStanzas _ = NoCommonStanzas +specHasCommonStanzas v = + if v >= CabalSpecV2_2 + then HasCommonStanzas + else NoCommonStanzas specHasElif :: CabalSpecVersion -> HasElif -specHasElif CabalSpecV2_2 = HasElif -specHasElif CabalSpecV2_4 = HasElif -specHasElif _ = NoElif - -------------------------------------------------------------------------------- --- Features -------------------------------------------------------------------------------- - -data CabalFeature - = Elif - | CommonStanzas - | Globstar - -- ^ Implemented in #5284. Not actually a change to the parser, - -- as filename patterns are opaque to it currently. - deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic) +specHasElif v = + if v >= CabalSpecV2_2 + then HasElif + else NoElif ------------------------------------------------------------------------------- -- Booleans ------------------------------------------------------------------------------- +-- IDEA: make some kind of tagged booleans? data HasElif = HasElif | NoElif deriving (Eq, Show) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Compat/Prelude.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Compat/Prelude.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Compat/Prelude.hs 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Compat/Prelude.hs 2018-11-27 22:49:58.000000000 +0000 @@ -4,9 +4,11 @@ {-# LANGUAGE FlexibleContexts #-} #ifdef MIN_VERSION_base +#define MINVER_base_411 MIN_VERSION_base(4,11,0) #define MINVER_base_48 MIN_VERSION_base(4,8,0) #define MINVER_base_47 MIN_VERSION_base(4,7,0) #else +#define MINVER_base_411 (__GLASGOW_HASKELL__ >= 804) #define MINVER_base_48 (__GLASGOW_HASKELL__ >= 710) #define MINVER_base_47 (__GLASGOW_HASKELL__ >= 708) #endif @@ -90,10 +92,14 @@ -- * Text.PrettyPrint (<<>>), ) where - -- We also could hide few partial function import Prelude as BasePrelude hiding ( IO, mapM, mapM_, sequence, null, length, foldr, any, all +#if MINVER_base_411 + -- As of base 4.11.0.0 Prelude exports part of Semigroup(..). + -- Hide this so we instead rely on Distribution.Compat.Semigroup. + , Semigroup(..) +#endif #if MINVER_base_48 , Word -- We hide them, as we import only some members diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Class.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Class.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Class.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Class.hs 2018-11-27 22:49:57.000000000 +0000 @@ -4,7 +4,6 @@ optionalField, optionalFieldDef, monoidalField, - deprecatedField', ) where import Distribution.Compat.Lens @@ -13,10 +12,11 @@ import Data.Functor.Identity (Identity (..)) -import Distribution.Compat.Newtype (Newtype) -import Distribution.Parsec.Class (Parsec) +import Distribution.CabalSpecVersion (CabalSpecVersion) +import Distribution.Compat.Newtype (Newtype) +import Distribution.Parsec.Class (Parsec) import Distribution.Parsec.Field -import Distribution.Pretty (Pretty) +import Distribution.Pretty (Pretty) -- | 'FieldGrammar' is parametrised by -- @@ -90,15 +90,15 @@ -- | Deprecated since deprecatedSince - :: [Int] -- ^ version - -> String -- ^ deprecation message + :: CabalSpecVersion -- ^ version + -> String -- ^ deprecation message -> g s a -> g s a -- | Annotate field with since spec-version. availableSince - :: [Int] -- ^ spec version - -> a -- ^ default value + :: CabalSpecVersion -- ^ spec version + -> a -- ^ default value -> g s a -> g s a @@ -134,14 +134,3 @@ -> ALens' s a -- ^ lens into the field -> g s a monoidalField fn = monoidalFieldAla fn Identity - --- | Deprecated field. If found, warning is issued. --- --- /Note:/ also it's not pretty printed! --- -deprecatedField' - :: FieldGrammar g - => String -- ^ deprecation message - -> g s a - -> g s a -deprecatedField' = deprecatedSince [] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Parsec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Parsec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Parsec.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Parsec.hs 2018-11-27 22:49:57.000000000 +0000 @@ -231,28 +231,29 @@ availableSince vs def (ParsecFG names prefixes parser) = ParsecFG names prefixes parser' where parser' v values - | cabalSpecSupports v vs = parser v values + | v >= vs = parser v values | otherwise = do let unknownFields = Map.intersection values $ Map.fromSet (const ()) names for_ (Map.toList unknownFields) $ \(name, fields) -> for_ fields $ \(MkNamelessField pos _) -> parseWarning pos PWTUnknownField $ - "The field " <> show name <> " is available since Cabal " ++ show vs + "The field " <> show name <> " is available only since the Cabal specification version " ++ showCabalSpecVersion vs ++ "." pure def -- todo we know about this field - deprecatedSince (_ : _) _ grammar = grammar -- pass on non-empty version - deprecatedSince _ msg (ParsecFG names prefixes parser) = ParsecFG names prefixes parser' + deprecatedSince vs msg (ParsecFG names prefixes parser) = ParsecFG names prefixes parser' where - parser' v values = do - let deprecatedFields = Map.intersection values $ Map.fromSet (const ()) names - for_ (Map.toList deprecatedFields) $ \(name, fields) -> - for_ fields $ \(MkNamelessField pos _) -> - parseWarning pos PWTDeprecatedField $ - "The field " <> show name <> " is deprecated. " ++ msg + parser' v values + | v >= vs = do + let deprecatedFields = Map.intersection values $ Map.fromSet (const ()) names + for_ (Map.toList deprecatedFields) $ \(name, fields) -> + for_ fields $ \(MkNamelessField pos _) -> + parseWarning pos PWTDeprecatedField $ + "The field " <> show name <> " is deprecated in the Cabal specification version " ++ showCabalSpecVersion vs ++ ". " ++ msg - parser v values + parser v values + | otherwise = parser v values knownField fn = ParsecFG (Set.singleton fn) Set.empty (\_ _ -> pure ()) @@ -262,36 +263,33 @@ -- Parsec ------------------------------------------------------------------------------- -runFieldParser' :: Position -> ParsecParser a -> CabalSpecVersion -> FieldLineStream -> ParseResult a -runFieldParser' (Position row col) p v str = case P.runParser p' [] "" str of +runFieldParser' :: [Position] -> ParsecParser a -> CabalSpecVersion -> FieldLineStream -> ParseResult a +runFieldParser' inputPoss p v str = case P.runParser p' [] "" str of Right (pok, ws) -> do - -- TODO: map pos - traverse_ (\(PWarning t pos w) -> parseWarning pos t w) ws + traverse_ (\(PWarning t pos w) -> parseWarning (mapPosition pos) t w) ws pure pok Left err -> do let ppos = P.errorPos err - -- Positions start from 1:1, not 0:0 - let epos = Position (row - 1 + P.sourceLine ppos) (col - 1 + P.sourceColumn ppos) + let epos = mapPosition $ Position (P.sourceLine ppos) (P.sourceColumn ppos) + let msg = P.showErrorMessages "or" "unknown parse error" "expecting" "unexpected" "end of input" (P.errorMessages err) - let str' = unlines (filter (not . all isSpace) (fieldLineStreamToLines str)) - - parseFatalFailure epos $ msg ++ "\n" ++ "\n" ++ str' + parseFatalFailure epos $ msg ++ "\n" where p' = (,) <$ P.spaces <*> unPP p v <* P.spaces <* P.eof <*> P.getState -fieldLineStreamToLines :: FieldLineStream -> [String] -fieldLineStreamToLines (FLSLast bs) = [ fromUTF8BS bs ] -fieldLineStreamToLines (FLSCons bs s) = fromUTF8BS bs : fieldLineStreamToLines s + -- Positions start from 1:1, not 0:0 + mapPosition (Position prow pcol) = go (prow - 1) inputPoss where + go _ [] = zeroPos + go _ [Position row col] = Position row (col + pcol - 1) + go n (Position row col:_) | n <= 0 = Position row (col + pcol - 1) + go n (_:ps) = go (n - 1) ps runFieldParser :: Position -> ParsecParser a -> CabalSpecVersion -> [FieldLine Position] -> ParseResult a -runFieldParser pp p v ls = runFieldParser' pos p v (fieldLinesToStream ls) +runFieldParser pp p v ls = runFieldParser' poss p v (fieldLinesToStream ls) where - -- TODO: make per line lookup - pos = case ls of - [] -> pp - (FieldLine pos' _ : _) -> pos' + poss = map (\(FieldLine pos _) -> pos) ls ++ [pp] -- add "default" position fieldlinesToBS :: [FieldLine ann] -> BS.ByteString fieldlinesToBS = BS.intercalate "\n" . map (\(FieldLine _ bs) -> bs) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Pretty.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Pretty.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Pretty.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar/Pretty.hs 2018-11-27 22:49:57.000000000 +0000 @@ -74,7 +74,6 @@ ] knownField _ = pure () - deprecatedSince [] _ _ = PrettyFG (\_ -> mempty) deprecatedSince _ _ x = x availableSince _ _ = id hiddenField _ = PrettyFG (\_ -> mempty) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/FieldGrammar.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/FieldGrammar.hs 2018-11-27 22:49:57.000000000 +0000 @@ -9,7 +9,6 @@ optionalField, optionalFieldDef, monoidalField, - deprecatedField', -- * Concrete grammar implementations ParsecFieldGrammar, ParsecFieldGrammar', diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/InstalledPackageInfo.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/InstalledPackageInfo.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/InstalledPackageInfo.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/InstalledPackageInfo.hs 2018-11-27 22:49:57.000000000 +0000 @@ -54,6 +54,7 @@ import Distribution.Package hiding (installedPackageId, installedUnitId) import Distribution.ParseUtils import Distribution.Types.ComponentName +import Distribution.Types.LibraryName import Distribution.Utils.Generic (toUTF8BS) import qualified Data.Map as Map @@ -104,8 +105,8 @@ sourceComponentName :: InstalledPackageInfo -> ComponentName sourceComponentName ipi = case sourceLibName ipi of - Nothing -> CLibName - Just qn -> CSubLibName qn + Nothing -> CLibName LMainLibName + Just qn -> CLibName $ LSubLibName qn -- ----------------------------------------------------------------------------- -- Parsing diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/ModuleName.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/ModuleName.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/ModuleName.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/ModuleName.hs 2018-11-27 22:49:57.000000000 +0000 @@ -79,7 +79,7 @@ validModuleComponent (c:cs) = isUpper c && all validModuleChar cs -{-# DEPRECATED simple "use ModuleName.fromString instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED simple "use ModuleName.fromString instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} simple :: String -> ModuleName simple str = ModuleName (stlFromStrings [str]) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/Check.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/Check.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/Check.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/Check.hs 2018-11-27 22:49:57.000000000 +0000 @@ -51,7 +51,6 @@ import Distribution.Simple.Glob import Distribution.Simple.Utils hiding (findPackageDesc, notice) import Distribution.System -import Distribution.Text import Distribution.Types.ComponentRequestedSpec import Distribution.Types.CondTree import Distribution.Types.ExeDependency @@ -164,7 +163,7 @@ ++ checkFields pkg ++ checkLicense pkg ++ checkSourceRepos pkg - ++ checkGhcOptions pkg + ++ checkAllGhcOptions pkg ++ checkCCOptions pkg ++ checkCxxOptions pkg ++ checkCPPOptions pkg @@ -209,13 +208,13 @@ -- NB: but it's OK for executables to have the same name! -- TODO shouldn't need to compare on the string level - , check (any (== display (packageName pkg)) (display <$> subLibNames)) $ + , check (any (== prettyShow (packageName pkg)) (prettyShow <$> subLibNames)) $ PackageBuildImpossible $ "Illegal internal library name " - ++ display (packageName pkg) + ++ prettyShow (packageName pkg) ++ ". Internal libraries cannot have the same name as the package." ++ " Maybe you wanted a non-internal library?" ++ " If so, rewrite the section stanza" - ++ " from 'library: '" ++ display (packageName pkg) ++ "' to 'library'." + ++ " from 'library: '" ++ prettyShow (packageName pkg) ++ "' to 'library'." ] --TODO: check for name clashes case insensitively: windows file systems cannot --cope. @@ -230,8 +229,8 @@ check (specVersion pkg > cabalVersion) $ PackageBuildImpossible $ "This package description follows version " - ++ display (specVersion pkg) ++ " of the Cabal specification. This " - ++ "tool only supports up to version " ++ display cabalVersion ++ "." + ++ prettyShow (specVersion pkg) ++ " of the Cabal specification. This " + ++ "tool only supports up to version " ++ prettyShow cabalVersion ++ "." ] where -- The public 'library' gets special dispensation, because it @@ -250,14 +249,14 @@ check (not (null moduleDuplicates)) $ PackageBuildImpossible $ "Duplicate modules in library: " - ++ commaSep (map display moduleDuplicates) + ++ commaSep (map prettyShow moduleDuplicates) -- TODO: This check is bogus if a required-signature was passed through , check (null (explicitLibModules lib) && null (reexportedModules lib)) $ PackageDistSuspiciousWarn $ "Library " ++ (case libName lib of Nothing -> "" - Just n -> display n + Just n -> prettyShow n ) ++ "does not expose any modules" -- check use of signatures sections @@ -291,7 +290,7 @@ check (null (modulePath exe)) $ PackageBuildImpossible $ - "No 'main-is' field found for executable " ++ display (exeName exe) + "No 'main-is' field found for executable " ++ prettyShow (exeName exe) , check (not (null (modulePath exe)) && (not $ fileExtensionSupportedLanguage $ modulePath exe)) $ @@ -309,14 +308,14 @@ , check (not (null moduleDuplicates)) $ PackageBuildImpossible $ - "Duplicate modules in executable '" ++ display (exeName exe) ++ "': " - ++ commaSep (map display moduleDuplicates) + "Duplicate modules in executable '" ++ prettyShow (exeName exe) ++ "': " + ++ commaSep (map prettyShow moduleDuplicates) -- check that all autogen-modules appear on other-modules , check (not $ and $ map (flip elem (exeModules exe)) (exeModulesAutogen exe)) $ PackageBuildImpossible $ - "On executable '" ++ display (exeName exe) ++ "' an 'autogen-module' is not " + "On executable '" ++ prettyShow (exeName exe) ++ "' an 'autogen-module' is not " ++ "on 'other-modules'" ] where @@ -329,21 +328,21 @@ case testInterface test of TestSuiteUnsupported tt@(TestTypeUnknown _ _) -> Just $ PackageBuildWarning $ - quote (display tt) ++ " is not a known type of test suite. " + quote (prettyShow tt) ++ " is not a known type of test suite. " ++ "The known test suite types are: " - ++ commaSep (map display knownTestTypes) + ++ commaSep (map prettyShow knownTestTypes) TestSuiteUnsupported tt -> Just $ PackageBuildWarning $ - quote (display tt) ++ " is not a supported test suite version. " + quote (prettyShow tt) ++ " is not a supported test suite version. " ++ "The known test suite types are: " - ++ commaSep (map display knownTestTypes) + ++ commaSep (map prettyShow knownTestTypes) _ -> Nothing , check (not $ null moduleDuplicates) $ PackageBuildImpossible $ - "Duplicate modules in test suite '" ++ display (testName test) ++ "': " - ++ commaSep (map display moduleDuplicates) + "Duplicate modules in test suite '" ++ prettyShow (testName test) ++ "': " + ++ commaSep (map prettyShow moduleDuplicates) , check mainIsWrongExt $ PackageBuildImpossible $ @@ -363,7 +362,7 @@ (testModulesAutogen test) ) $ PackageBuildImpossible $ - "On test suite '" ++ display (testName test) ++ "' an 'autogen-module' is not " + "On test suite '" ++ prettyShow (testName test) ++ "' an 'autogen-module' is not " ++ "on 'other-modules'" ] where @@ -384,21 +383,21 @@ case benchmarkInterface bm of BenchmarkUnsupported tt@(BenchmarkTypeUnknown _ _) -> Just $ PackageBuildWarning $ - quote (display tt) ++ " is not a known type of benchmark. " + quote (prettyShow tt) ++ " is not a known type of benchmark. " ++ "The known benchmark types are: " - ++ commaSep (map display knownBenchmarkTypes) + ++ commaSep (map prettyShow knownBenchmarkTypes) BenchmarkUnsupported tt -> Just $ PackageBuildWarning $ - quote (display tt) ++ " is not a supported benchmark version. " + quote (prettyShow tt) ++ " is not a supported benchmark version. " ++ "The known benchmark types are: " - ++ commaSep (map display knownBenchmarkTypes) + ++ commaSep (map prettyShow knownBenchmarkTypes) _ -> Nothing , check (not $ null moduleDuplicates) $ PackageBuildImpossible $ - "Duplicate modules in benchmark '" ++ display (benchmarkName bm) ++ "': " - ++ commaSep (map display moduleDuplicates) + "Duplicate modules in benchmark '" ++ prettyShow (benchmarkName bm) ++ "': " + ++ commaSep (map prettyShow moduleDuplicates) , check mainIsWrongExt $ PackageBuildImpossible $ @@ -412,7 +411,7 @@ (benchmarkModulesAutogen bm) ) $ PackageBuildImpossible $ - "On benchmark '" ++ display (benchmarkName bm) ++ "' an 'autogen-module' is " + "On benchmark '" ++ prettyShow (benchmarkName bm) ++ "' an 'autogen-module' is " ++ "not on 'other-modules'" ] where @@ -430,14 +429,14 @@ checkFields pkg = catMaybes [ - check (not . FilePath.Windows.isValid . display . packageName $ pkg) $ + check (not . FilePath.Windows.isValid . prettyShow . packageName $ pkg) $ PackageDistInexcusable $ - "Unfortunately, the package name '" ++ display (packageName pkg) + "Unfortunately, the package name '" ++ prettyShow (packageName pkg) ++ "' is one of the reserved system file names on Windows. Many tools " ++ "need to convert package names to file names so using this name " ++ "would cause problems." - , check ((isPrefixOf "z-") . display . packageName $ pkg) $ + , check ((isPrefixOf "z-") . prettyShow . packageName $ pkg) $ PackageDistInexcusable $ "Package names with the prefix 'z-' are reserved by Cabal and " ++ "cannot be used." @@ -476,10 +475,10 @@ , check (not (null ourDeprecatedExtensions)) $ PackageDistSuspicious $ "Deprecated extensions: " - ++ commaSep (map (quote . display . fst) ourDeprecatedExtensions) + ++ commaSep (map (quote . prettyShow . fst) ourDeprecatedExtensions) ++ ". " ++ unwords - [ "Instead of '" ++ display ext - ++ "' use '" ++ display replacement ++ "'." + [ "Instead of '" ++ prettyShow ext + ++ "' use '" ++ prettyShow replacement ++ "'." | (ext, Just replacement) <- ourDeprecatedExtensions ] , check (null (category pkg)) $ @@ -525,7 +524,7 @@ , check (not (null testedWithImpossibleRanges)) $ PackageDistInexcusable $ "Invalid 'tested-with' version range: " - ++ commaSep (map display testedWithImpossibleRanges) + ++ commaSep (map prettyShow testedWithImpossibleRanges) ++ ". To indicate that you have tested a package with multiple " ++ "different versions of the same compiler use multiple entries, " ++ "for example 'tested-with: GHC==6.10.4, GHC==6.12.3' and not " @@ -535,7 +534,7 @@ PackageBuildWarning $ "The package has an extraneous version range for a dependency on an " ++ "internal library: " - ++ commaSep (map display depInternalLibraryWithExtraVersion) + ++ commaSep (map prettyShow depInternalLibraryWithExtraVersion) ++ ". This version range includes the current package but isn't needed " ++ "as the current package's library will always be used." @@ -543,7 +542,7 @@ PackageBuildImpossible $ "The package has an impossible version range for a dependency on an " ++ "internal library: " - ++ commaSep (map display depInternalLibraryWithImpossibleVersion) + ++ commaSep (map prettyShow depInternalLibraryWithImpossibleVersion) ++ ". This version range does not include the current package, and must " ++ "be removed as the current package's library will always be used." @@ -551,7 +550,7 @@ PackageBuildWarning $ "The package has an extraneous version range for a dependency on an " ++ "internal executable: " - ++ commaSep (map display depInternalExecutableWithExtraVersion) + ++ commaSep (map prettyShow depInternalExecutableWithExtraVersion) ++ ". This version range includes the current package but isn't needed " ++ "as the current package's executable will always be used." @@ -559,14 +558,14 @@ PackageBuildImpossible $ "The package has an impossible version range for a dependency on an " ++ "internal executable: " - ++ commaSep (map display depInternalExecutableWithImpossibleVersion) + ++ commaSep (map prettyShow depInternalExecutableWithImpossibleVersion) ++ ". This version range does not include the current package, and must " ++ "be removed as the current package's executable will always be used." , check (not (null depMissingInternalExecutable)) $ PackageBuildImpossible $ "The package depends on a missing internal executable: " - ++ commaSep (map display depInternalExecutableWithImpossibleVersion) + ++ commaSep (map prettyShow depInternalExecutableWithImpossibleVersion) ] where unknownCompilers = [ name | (OtherCompiler name, _) <- testedWith pkg ] @@ -574,7 +573,7 @@ , UnknownLanguage name <- allLanguages bi ] unknownExtensions = [ name | bi <- allBuildInfo pkg , UnknownExtension name <- allExtensions bi - , name `notElem` map display knownLanguages ] + , name `notElem` map prettyShow knownLanguages ] ourDeprecatedExtensions = nub $ catMaybes [ find ((==ext) . fst) deprecatedExtensions | bi <- allBuildInfo pkg @@ -582,10 +581,10 @@ languagesUsedAsExtensions = [ name | bi <- allBuildInfo pkg , UnknownExtension name <- allExtensions bi - , name `elem` map display knownLanguages ] + , name `elem` map prettyShow knownLanguages ] testedWithImpossibleRanges = - [ Dependency (mkPackageName (display compiler)) vr + [ Dependency (mkPackageName (prettyShow compiler)) vr Set.empty | (compiler, vr) <- testedWith pkg , isNoVersion vr ] @@ -598,7 +597,7 @@ internalLibDeps = [ dep | bi <- allBuildInfo pkg - , dep@(Dependency name _) <- targetBuildDepends bi + , dep@(Dependency name _ _) <- targetBuildDepends bi , name `elem` internalLibraries ] @@ -611,14 +610,14 @@ depInternalLibraryWithExtraVersion = [ dep - | dep@(Dependency _ versionRange) <- internalLibDeps + | dep@(Dependency _ versionRange _) <- internalLibDeps , not $ isAnyVersion versionRange , packageVersion pkg `withinRange` versionRange ] depInternalLibraryWithImpossibleVersion = [ dep - | dep@(Dependency _ versionRange) <- internalLibDeps + | dep@(Dependency _ versionRange _) <- internalLibDeps , not $ packageVersion pkg `withinRange` versionRange ] @@ -676,7 +675,7 @@ PackageBuildWarning $ quote ("license: " ++ l) ++ " is not a recognised license. The " ++ "known licenses are: " - ++ commaSep (map display knownLicenses) + ++ commaSep (map prettyShow knownLicenses) _ -> Nothing , check (lic == BSD4) $ @@ -688,9 +687,9 @@ , case unknownLicenseVersion (lic) of Just knownVersions -> Just $ PackageDistSuspicious $ - "'license: " ++ display (lic) ++ "' is not a known " + "'license: " ++ prettyShow (lic) ++ "' is not a known " ++ "version of that license. The known versions are " - ++ commaSep (map display knownVersions) + ++ commaSep (map prettyShow knownVersions) ++ ". If this is not a mistake and you think it should be a known " ++ "version then please file a ticket." _ -> Nothing @@ -762,86 +761,97 @@ --TODO: check location looks like a URL for some repo types. -checkGhcOptions :: PackageDescription -> [PackageCheck] -checkGhcOptions pkg = +-- | Checks GHC options from all ghc-*-options fields in the given +-- PackageDescription and reports commonly misused or non-portable flags +checkAllGhcOptions :: PackageDescription -> [PackageCheck] +checkAllGhcOptions pkg = + checkGhcOptions "ghc-options" (hcOptions GHC) pkg + ++ checkGhcOptions "ghc-prof-options" (hcProfOptions GHC) pkg + ++ checkGhcOptions "ghc-shared-options" (hcSharedOptions GHC) pkg + +-- | Extracts GHC options belonging to the given field from the given +-- PackageDescription using given function and checks them for commonly misused +-- or non-portable flags +checkGhcOptions :: String -> (BuildInfo -> [String]) -> PackageDescription -> [PackageCheck] +checkGhcOptions fieldName getOptions pkg = catMaybes [ checkFlags ["-fasm"] $ PackageDistInexcusable $ - "'ghc-options: -fasm' is unnecessary and will not work on CPU " + "'" ++ fieldName ++ ": -fasm' is unnecessary and will not work on CPU " ++ "architectures other than x86, x86-64, ppc or sparc." , checkFlags ["-fvia-C"] $ PackageDistSuspicious $ - "'ghc-options: -fvia-C' is usually unnecessary. If your package " + "'" ++ fieldName ++": -fvia-C' is usually unnecessary. If your package " ++ "needs -via-C for correctness rather than performance then it " ++ "is using the FFI incorrectly and will probably not work with GHC " ++ "6.10 or later." , checkFlags ["-fhpc"] $ PackageDistInexcusable $ - "'ghc-options: -fhpc' is not not necessary. Use the configure flag " + "'" ++ fieldName ++ ": -fhpc' is not not necessary. Use the configure flag " ++ " --enable-coverage instead." , checkFlags ["-prof"] $ PackageBuildWarning $ - "'ghc-options: -prof' is not necessary and will lead to problems " + "'" ++ fieldName ++ ": -prof' is not necessary and will lead to problems " ++ "when used on a library. Use the configure flag " ++ "--enable-library-profiling and/or --enable-profiling." , checkFlags ["-o"] $ PackageBuildWarning $ - "'ghc-options: -o' is not needed. " + "'" ++ fieldName ++ ": -o' is not needed. " ++ "The output files are named automatically." , checkFlags ["-hide-package"] $ PackageBuildWarning $ - "'ghc-options: -hide-package' is never needed. " + "'" ++ fieldName ++ ": -hide-package' is never needed. " ++ "Cabal hides all packages." , checkFlags ["--make"] $ PackageBuildWarning $ - "'ghc-options: --make' is never needed. Cabal uses this automatically." + "'" ++ fieldName ++ ": --make' is never needed. Cabal uses this automatically." , checkFlags ["-main-is"] $ PackageDistSuspicious $ - "'ghc-options: -main-is' is not portable." + "'" ++ fieldName ++ ": -main-is' is not portable." , checkNonTestAndBenchmarkFlags ["-O0", "-Onot"] $ PackageDistSuspicious $ - "'ghc-options: -O0' is not needed. " + "'" ++ fieldName ++ ": -O0' is not needed. " ++ "Use the --disable-optimization configure flag." , checkTestAndBenchmarkFlags ["-O0", "-Onot"] $ PackageDistSuspiciousWarn $ - "'ghc-options: -O0' is not needed. " + "'" ++ fieldName ++ ": -O0' is not needed. " ++ "Use the --disable-optimization configure flag." , checkFlags [ "-O", "-O1"] $ PackageDistInexcusable $ - "'ghc-options: -O' is not needed. " + "'" ++ fieldName ++ ": -O' is not needed. " ++ "Cabal automatically adds the '-O' flag. " ++ "Setting it yourself interferes with the --disable-optimization flag." , checkFlags ["-O2"] $ PackageDistSuspiciousWarn $ - "'ghc-options: -O2' is rarely needed. " + "'" ++ fieldName ++ ": -O2' is rarely needed. " ++ "Check that it is giving a real benefit " ++ "and not just imposing longer compile times on your users." , checkFlags ["-split-sections"] $ PackageBuildWarning $ - "'ghc-options: -split-sections' is not needed. " + "'" ++ fieldName ++ ": -split-sections' is not needed. " ++ "Use the --enable-split-sections configure flag." , checkFlags ["-split-objs"] $ PackageBuildWarning $ - "'ghc-options: -split-objs' is not needed. " + "'" ++ fieldName ++ ": -split-objs' is not needed. " ++ "Use the --enable-split-objs configure flag." , checkFlags ["-optl-Wl,-s", "-optl-s"] $ PackageDistInexcusable $ - "'ghc-options: -optl-Wl,-s' is not needed and is not portable to all" + "'" ++ fieldName ++ ": -optl-Wl,-s' is not needed and is not portable to all" ++ " operating systems. Cabal 1.4 and later automatically strip" ++ " executables. Cabal also has a flag --disable-executable-stripping" ++ " which is necessary when building packages for some Linux" @@ -849,67 +859,64 @@ , checkFlags ["-fglasgow-exts"] $ PackageDistSuspicious $ - "Instead of 'ghc-options: -fglasgow-exts' it is preferable to use " + "Instead of '" ++ fieldName ++ ": -fglasgow-exts' it is preferable to use " ++ "the 'extensions' field." , check ("-threaded" `elem` lib_ghc_options) $ PackageBuildWarning $ - "'ghc-options: -threaded' has no effect for libraries. It should " + "'" ++ fieldName ++ ": -threaded' has no effect for libraries. It should " ++ "only be used for executables." , check ("-rtsopts" `elem` lib_ghc_options) $ PackageBuildWarning $ - "'ghc-options: -rtsopts' has no effect for libraries. It should " + "'" ++ fieldName ++ ": -rtsopts' has no effect for libraries. It should " ++ "only be used for executables." , check (any (\opt -> "-with-rtsopts" `isPrefixOf` opt) lib_ghc_options) $ PackageBuildWarning $ - "'ghc-options: -with-rtsopts' has no effect for libraries. It " + "'" ++ fieldName ++ ": -with-rtsopts' has no effect for libraries. It " ++ "should only be used for executables." - , checkAlternatives "ghc-options" "extensions" - [ (flag, display extension) | flag <- all_ghc_options + , checkAlternatives fieldName "extensions" + [ (flag, prettyShow extension) | flag <- all_ghc_options , Just extension <- [ghcExtension flag] ] - , checkAlternatives "ghc-options" "extensions" + , checkAlternatives fieldName "extensions" [ (flag, extension) | flag@('-':'X':extension) <- all_ghc_options ] - , checkAlternatives "ghc-options" "cpp-options" $ + , checkAlternatives fieldName "cpp-options" $ [ (flag, flag) | flag@('-':'D':_) <- all_ghc_options ] ++ [ (flag, flag) | flag@('-':'U':_) <- all_ghc_options ] - , checkAlternatives "ghc-options" "include-dirs" + , checkAlternatives fieldName "include-dirs" [ (flag, dir) | flag@('-':'I':dir) <- all_ghc_options ] - , checkAlternatives "ghc-options" "extra-libraries" + , checkAlternatives fieldName "extra-libraries" [ (flag, lib) | flag@('-':'l':lib) <- all_ghc_options ] - , checkAlternatives "ghc-options" "extra-lib-dirs" + , checkAlternatives fieldName "extra-lib-dirs" [ (flag, dir) | flag@('-':'L':dir) <- all_ghc_options ] - , checkAlternatives "ghc-options" "frameworks" + , checkAlternatives fieldName "frameworks" [ (flag, fmwk) | (flag@"-framework", fmwk) <- zip all_ghc_options (safeTail all_ghc_options) ] - , checkAlternatives "ghc-options" "extra-framework-dirs" + , checkAlternatives fieldName "extra-framework-dirs" [ (flag, dir) | (flag@"-framework-path", dir) <- zip all_ghc_options (safeTail all_ghc_options) ] ] where - all_ghc_options = concatMap get_ghc_options (allBuildInfo pkg) - lib_ghc_options = concatMap (get_ghc_options . libBuildInfo) + all_ghc_options = concatMap getOptions (allBuildInfo pkg) + lib_ghc_options = concatMap (getOptions . libBuildInfo) (allLibraries pkg) - get_ghc_options bi = hcOptions GHC bi ++ hcProfOptions GHC bi - ++ hcSharedOptions GHC bi - - test_ghc_options = concatMap (get_ghc_options . testBuildInfo) + test_ghc_options = concatMap (getOptions . testBuildInfo) (testSuites pkg) - benchmark_ghc_options = concatMap (get_ghc_options . benchmarkBuildInfo) + benchmark_ghc_options = concatMap (getOptions . benchmarkBuildInfo) (benchmarks pkg) test_and_benchmark_ghc_options = test_ghc_options ++ benchmark_ghc_options - non_test_and_benchmark_ghc_options = concatMap get_ghc_options + non_test_and_benchmark_ghc_options = concatMap getOptions (allBuildInfo (pkg { testSuites = [] , benchmarks = [] })) @@ -1123,7 +1130,7 @@ PackageBuildWarning $ "Packages relying on Cabal 1.10 or later must only specify a " ++ "version range of the form 'cabal-version: >= x.y'. Use " - ++ "'cabal-version: >= " ++ display (specVersion pkg) ++ "'." + ++ "'cabal-version: >= " ++ prettyShow (specVersion pkg) ++ "'." -- check syntax of cabal-version field , check (specVersion pkg < mkVersion [1,9] @@ -1131,7 +1138,7 @@ PackageDistSuspicious $ "It is recommended that the 'cabal-version' field only specify a " ++ "version range of the form '>= x.y'. Use " - ++ "'cabal-version: >= " ++ display (specVersion pkg) ++ "'. " + ++ "'cabal-version: >= " ++ prettyShow (specVersion pkg) ++ "'. " ++ "Tools based on Cabal 1.10 and later will ignore upper bounds." -- check syntax of cabal-version field @@ -1139,7 +1146,7 @@ PackageBuildWarning $ "With Cabal 1.10 or earlier, the 'cabal-version' field must use " ++ "range syntax rather than a simple version number. Use " - ++ "'cabal-version: >= " ++ display (specVersion pkg) ++ "'." + ++ "'cabal-version: >= " ++ prettyShow (specVersion pkg) ++ "'." -- check syntax of cabal-version field , check (specVersion pkg >= mkVersion [1,12] @@ -1148,7 +1155,7 @@ "Packages relying on Cabal 1.12 or later should specify a " ++ "specific version of the Cabal spec of the form " ++ "'cabal-version: x.y'. " - ++ "Use 'cabal-version: " ++ display (specVersion pkg) ++ "'." + ++ "Use 'cabal-version: " ++ prettyShow (specVersion pkg) ++ "'." -- check use of test suite sections , checkVersion [1,8] (not (null $ testSuites pkg)) $ @@ -1239,24 +1246,24 @@ , checkVersion [1,6] (not (null depsUsingWildcardSyntax)) $ PackageDistInexcusable $ "The package uses wildcard syntax in the 'build-depends' field: " - ++ commaSep (map display depsUsingWildcardSyntax) + ++ commaSep (map prettyShow depsUsingWildcardSyntax) ++ ". To use this new syntax the package need to specify at least " ++ "'cabal-version: >= 1.6'. Alternatively, if broader compatibility " ++ "is important then use: " ++ commaSep - [ display (Dependency name (eliminateWildcardSyntax versionRange)) - | Dependency name versionRange <- depsUsingWildcardSyntax ] + [ prettyShow (Dependency name (eliminateWildcardSyntax versionRange) Set.empty) + | Dependency name versionRange _ <- depsUsingWildcardSyntax ] -- check use of "build-depends: foo ^>= 1.2.3" syntax , checkVersion [2,0] (not (null depsUsingMajorBoundSyntax)) $ PackageDistInexcusable $ "The package uses major bounded version syntax in the " ++ "'build-depends' field: " - ++ commaSep (map display depsUsingMajorBoundSyntax) + ++ commaSep (map prettyShow depsUsingMajorBoundSyntax) ++ ". To use this new syntax the package need to specify at least " ++ "'cabal-version: 2.0'. Alternatively, if broader compatibility " ++ "is important then use: " ++ commaSep - [ display (Dependency name (eliminateMajorBoundSyntax versionRange)) - | Dependency name versionRange <- depsUsingMajorBoundSyntax ] + [ prettyShow (Dependency name (eliminateMajorBoundSyntax versionRange) Set.empty) + | Dependency name versionRange _ <- depsUsingMajorBoundSyntax ] , checkVersion [2,1] (any (not . null) (concatMap buildInfoField @@ -1269,6 +1276,14 @@ ++ " and 'extra-library-flavours' requires the package " ++ " to specify at least 'cabal-version: >= 2.1'." + , checkVersion [2,5] (any (not . null) $ buildInfoField extraDynLibFlavours) $ + PackageDistInexcusable $ + "The use of 'extra-dynamic-library-flavours' requires the package " + ++ " to specify at least 'cabal-version: >= 2.5'. The flavours are: " + ++ commaSep [ flav + | flavs <- buildInfoField extraDynLibFlavours + , flav <- flavs ] + , checkVersion [2,1] (any (not . null) (buildInfoField virtualModules)) $ PackageDistInexcusable $ @@ -1288,12 +1303,12 @@ , checkVersion [1,6] (not (null testedWithUsingWildcardSyntax)) $ PackageDistInexcusable $ "The package uses wildcard syntax in the 'tested-with' field: " - ++ commaSep (map display testedWithUsingWildcardSyntax) + ++ commaSep (map prettyShow testedWithUsingWildcardSyntax) ++ ". To use this new syntax the package need to specify at least " ++ "'cabal-version: >= 1.6'. Alternatively, if broader compatibility " ++ "is important then use: " ++ commaSep - [ display (Dependency name (eliminateWildcardSyntax versionRange)) - | Dependency name versionRange <- testedWithUsingWildcardSyntax ] + [ prettyShow (Dependency name (eliminateWildcardSyntax versionRange) Set.empty) + | Dependency name versionRange _ <- testedWithUsingWildcardSyntax ] -- check use of "source-repository" section , checkVersion [1,6] (not (null (sourceRepos pkg))) $ @@ -1306,7 +1321,7 @@ , checkVersion [1,2,3] (not (null mentionedExtensionsThatNeedCabal12)) $ PackageDistInexcusable $ "Unfortunately the language extensions " - ++ commaSep (map (quote . display) mentionedExtensionsThatNeedCabal12) + ++ commaSep (map (quote . prettyShow) mentionedExtensionsThatNeedCabal12) ++ " break the parser in earlier Cabal versions so you need to " ++ "specify 'cabal-version: >= 1.2.3'. Alternatively if you require " ++ "compatibility with earlier Cabal versions then you may be able to " @@ -1315,7 +1330,7 @@ , checkVersion [1,4] (not (null mentionedExtensionsThatNeedCabal14)) $ PackageDistInexcusable $ "Unfortunately the language extensions " - ++ commaSep (map (quote . display) mentionedExtensionsThatNeedCabal14) + ++ commaSep (map (quote . prettyShow) mentionedExtensionsThatNeedCabal14) ++ " break the parser in earlier Cabal versions so you need to " ++ "specify 'cabal-version: >= 1.4'. Alternatively if you require " ++ "compatibility with earlier Cabal versions then you may be able to " @@ -1367,11 +1382,11 @@ buildInfoField field = map field (allBuildInfo pkg) versionRangeExpressions = - [ dep | dep@(Dependency _ vr) <- allBuildDepends pkg + [ dep | dep@(Dependency _ vr _) <- allBuildDepends pkg , usesNewVersionRangeSyntax vr ] testedWithVersionRangeExpressions = - [ Dependency (mkPackageName (display compiler)) vr + [ Dependency (mkPackageName (prettyShow compiler)) vr Set.empty | (compiler, vr) <- testedWith pkg , usesNewVersionRangeSyntax vr ] @@ -1395,16 +1410,16 @@ alg (VersionRangeParensF _) = 3 alg _ = 1 :: Int - depsUsingWildcardSyntax = [ dep | dep@(Dependency _ vr) <- allBuildDepends pkg + depsUsingWildcardSyntax = [ dep | dep@(Dependency _ vr _) <- allBuildDepends pkg , usesWildcardSyntax vr ] - depsUsingMajorBoundSyntax = [ dep | dep@(Dependency _ vr) <- allBuildDepends pkg + depsUsingMajorBoundSyntax = [ dep | dep@(Dependency _ vr _) <- allBuildDepends pkg , usesMajorBoundSyntax vr ] usesBackpackIncludes = any (not . null . mixins) (allBuildInfo pkg) testedWithUsingWildcardSyntax = - [ Dependency (mkPackageName (display compiler)) vr + [ Dependency (mkPackageName (prettyShow compiler)) vr Set.empty | (compiler, vr) <- testedWith pkg , usesWildcardSyntax vr ] @@ -1493,8 +1508,8 @@ allModuleNamesAutogen = concatMap autogenModules (allBuildInfo pkg) displayRawDependency :: Dependency -> String -displayRawDependency (Dependency pkg vr) = - display pkg ++ " " ++ display vr +displayRawDependency (Dependency pkg vr _sublibs) = + prettyShow pkg ++ " " ++ prettyShow vr -- ------------------------------------------------------------ @@ -1545,7 +1560,7 @@ foldr intersectVersionRanges anyVersion baseDeps where baseDeps = - [ vr | Dependency pname vr <- allBuildDepends pkg' + [ vr | Dependency pname vr _ <- allBuildDepends pkg' , pname == mkPackageName "base" ] -- Just in case finalizePD fails for any reason, @@ -1692,41 +1707,53 @@ strings = EnableExtension OverloadedStrings lists = EnableExtension OverloadedLists +-- | Checks GHC options from all ghc-*-options fields from the given BuildInfo +-- and reports flags that are OK during development process, but are +-- unacceptable in a distrubuted package checkDevelopmentOnlyFlagsBuildInfo :: BuildInfo -> [PackageCheck] checkDevelopmentOnlyFlagsBuildInfo bi = + checkDevelopmentOnlyFlagsOptions "ghc-options" (hcOptions GHC bi) + ++ checkDevelopmentOnlyFlagsOptions "ghc-prof-options" (hcProfOptions GHC bi) + ++ checkDevelopmentOnlyFlagsOptions "ghc-shared-options" (hcSharedOptions GHC bi) + +-- | Checks the given list of flags belonging to the given field and reports +-- flags that are OK during development process, but are unacceptable in a +-- distributed package +checkDevelopmentOnlyFlagsOptions :: String -> [String] -> [PackageCheck] +checkDevelopmentOnlyFlagsOptions fieldName ghcOptions = catMaybes [ check has_WerrorWall $ PackageDistInexcusable $ - "'ghc-options: -Wall -Werror' makes the package very easy to " + "'" ++ fieldName ++ ": -Wall -Werror' makes the package very easy to " ++ "break with future GHC versions because new GHC versions often " - ++ "add new warnings. Use just 'ghc-options: -Wall' instead." + ++ "add new warnings. Use just '" ++ fieldName ++ ": -Wall' instead." ++ extraExplanation , check (not has_WerrorWall && has_Werror) $ PackageDistInexcusable $ - "'ghc-options: -Werror' makes the package easy to " + "'" ++ fieldName ++ ": -Werror' makes the package easy to " ++ "break with future GHC versions because new GHC versions often " ++ "add new warnings. " ++ extraExplanation , check (has_J) $ PackageDistInexcusable $ - "'ghc-options: -j[N]' can make sense for specific user's setup," + "'" ++ fieldName ++ ": -j[N]' can make sense for specific user's setup," ++ " but it is not appropriate for a distributed package." ++ extraExplanation , checkFlags ["-fdefer-type-errors"] $ PackageDistInexcusable $ - "'ghc-options: -fdefer-type-errors' is fine during development but " + "'" ++ fieldName ++ ": -fdefer-type-errors' is fine during development but " ++ "is not appropriate for a distributed package. " ++ extraExplanation -- -dynamic is not a debug flag , check (any (\opt -> "-d" `isPrefixOf` opt && opt /= "-dynamic") - ghc_options) $ + ghcOptions) $ PackageDistInexcusable $ - "'ghc-options: -d*' debug flags are not appropriate " + "'" ++ fieldName ++ ": -d*' debug flags are not appropriate " ++ "for a distributed package. " ++ extraExplanation @@ -1734,7 +1761,7 @@ "-fprof-cafs", "-fno-prof-count-entries", "-auto-all", "-auto", "-caf-all"] $ PackageDistSuspicious $ - "'ghc-options/ghc-prof-options: -fprof*' profiling flags are typically not " + "'" ++ fieldName ++ ": -fprof*' profiling flags are typically not " ++ "appropriate for a distributed library package. These flags are " ++ "useful to profile this package, but when profiling other packages " ++ "that use this one these flags clutter the profile output with " @@ -1750,21 +1777,18 @@ ++ "False') and enable that flag during development." has_WerrorWall = has_Werror && ( has_Wall || has_W ) - has_Werror = "-Werror" `elem` ghc_options - has_Wall = "-Wall" `elem` ghc_options - has_W = "-W" `elem` ghc_options + has_Werror = "-Werror" `elem` ghcOptions + has_Wall = "-Wall" `elem` ghcOptions + has_W = "-W" `elem` ghcOptions has_J = any (\o -> case o of "-j" -> True ('-' : 'j' : d : _) -> isDigit d _ -> False ) - ghc_options - ghc_options = hcOptions GHC bi ++ hcProfOptions GHC bi - ++ hcSharedOptions GHC bi - + ghcOptions checkFlags :: [String] -> PackageCheck -> Maybe PackageCheck - checkFlags flags = check (any (`elem` flags) ghc_options) + checkFlags flags = check (any (`elem` flags) ghcOptions) checkDevelopmentOnlyFlags :: GenericPackageDescription -> [PackageCheck] checkDevelopmentOnlyFlags pkg = diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/Configuration.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/Configuration.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/Configuration.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/Configuration.hs 2018-11-27 22:49:57.000000000 +0000 @@ -48,11 +48,12 @@ import Distribution.Version import Distribution.Compiler import Distribution.System +import Distribution.Parsec.Class +import Distribution.Pretty +import Distribution.Compat.CharParsing hiding (char) +import qualified Distribution.Compat.CharParsing as P import Distribution.Simple.Utils -import Distribution.Text import Distribution.Compat.Lens -import Distribution.Compat.ReadP as ReadP hiding ( char ) -import qualified Distribution.Compat.ReadP as ReadP ( char ) import Distribution.Types.ComponentRequestedSpec import Distribution.Types.ForeignLib import Distribution.Types.Component @@ -65,6 +66,8 @@ import qualified Data.Map.Strict as Map.Strict import qualified Data.Map.Lazy as Map +import Data.Set ( Set ) +import qualified Data.Set as Set import Data.Tree ( Tree(Node) ) ------------------------------------------------------------------------------ @@ -107,28 +110,29 @@ -- -- | Parse a configuration condition from a string. -parseCondition :: ReadP r (Condition ConfVar) +parseCondition :: CabalParsing m => m (Condition ConfVar) parseCondition = condOr where condOr = sepBy1 condAnd (oper "||") >>= return . foldl1 COr condAnd = sepBy1 cond (oper "&&")>>= return . foldl1 CAnd - cond = sp >> (boolLiteral +++ inparens condOr +++ notCond +++ osCond - +++ archCond +++ flagCond +++ implCond ) - inparens = between (ReadP.char '(' >> sp) (sp >> ReadP.char ')' >> sp) - notCond = ReadP.char '!' >> sp >> cond >>= return . CNot + -- TODO: try? + cond = sp >> (boolLiteral <|> inparens condOr <|> notCond <|> osCond + <|> archCond <|> flagCond <|> implCond ) + inparens = between (P.char '(' >> sp) (sp >> P.char ')' >> sp) + notCond = P.char '!' >> sp >> cond >>= return . CNot osCond = string "os" >> sp >> inparens osIdent >>= return . Var archCond = string "arch" >> sp >> inparens archIdent >>= return . Var flagCond = string "flag" >> sp >> inparens flagIdent >>= return . Var implCond = string "impl" >> sp >> inparens implIdent >>= return . Var - boolLiteral = fmap Lit parse - archIdent = fmap Arch parse - osIdent = fmap OS parse + boolLiteral = fmap Lit parsec + archIdent = fmap Arch parsec + osIdent = fmap OS parsec flagIdent = fmap (Flag . mkFlagName . lowercase) (munch1 isIdentChar) isIdentChar c = isAlphaNum c || c == '_' || c == '-' oper s = sp >> string s >> sp - sp = skipSpaces - implIdent = do i <- parse - vr <- sp >> option anyVersion parse + sp = spaces + implIdent = do i <- parsec + vr <- sp >> option anyVersion parsec return $ Impl i vr ------------------------------------------------------------------------------ @@ -229,7 +233,7 @@ mp (Left xs) (Left ys) = let union = Map.foldrWithKey (Map.Strict.insertWith combine) (unDepMapUnion xs) (unDepMapUnion ys) - combine x y = simplifyVersionRange $ unionVersionRanges x y + combine x y = (\(vr, cs) -> (simplifyVersionRange vr,cs)) $ unionVersionRanges' x y in union `seq` Left (DepMapUnion union) -- `mzero' @@ -307,14 +311,22 @@ -- | A map of dependencies that combines version ranges using 'unionVersionRanges'. -newtype DepMapUnion = DepMapUnion { unDepMapUnion :: Map PackageName VersionRange } +newtype DepMapUnion = DepMapUnion { unDepMapUnion :: Map PackageName (VersionRange, Set LibraryName) } + +-- An union of versions should correspond to an intersection of the components. +-- The intersection may not be necessary. +unionVersionRanges' :: (VersionRange, Set LibraryName) + -> (VersionRange, Set LibraryName) + -> (VersionRange, Set LibraryName) +unionVersionRanges' (vra, csa) (vrb, csb) = + (unionVersionRanges vra vrb, Set.intersection csa csb) toDepMapUnion :: [Dependency] -> DepMapUnion toDepMapUnion ds = - DepMapUnion $ Map.fromListWith unionVersionRanges [ (p,vr) | Dependency p vr <- ds ] + DepMapUnion $ Map.fromListWith unionVersionRanges' [ (p,(vr,cs)) | Dependency p vr cs <- ds ] fromDepMapUnion :: DepMapUnion -> [Dependency] -fromDepMapUnion m = [ Dependency p vr | (p,vr) <- Map.toList (unDepMapUnion m) ] +fromDepMapUnion m = [ Dependency p vr cs | (p,(vr,cs)) <- Map.toList (unDepMapUnion m) ] freeVars :: CondTree ConfVar c a -> [FlagName] freeVars t = [ f | Flag f <- freeVars' t ] @@ -344,12 +356,14 @@ -- UGH. The embedded componentName in the 'Component's here is -- BLANK. I don't know whose fault this is but I'll use the tag -- instead. -- ezyang - removeDisabledSections (Lib _) = componentNameRequested enabled CLibName + removeDisabledSections (Lib _) = componentNameRequested + enabled + (CLibName LMainLibName) removeDisabledSections (SubComp t c) -- Do NOT use componentName = componentNameRequested enabled $ case c of - CLib _ -> CSubLibName t + CLib _ -> CLibName (LSubLibName t) CFLib _ -> CFLibName t CExe _ -> CExeName t CTest _ -> CTestName t @@ -365,7 +379,7 @@ (Lib l, (Nothing, comps)) -> (Just $ redoBD l, comps) (SubComp n c, (mb_lib, comps)) | any ((== n) . fst) comps -> - userBug $ "There exist several components with the same name: '" ++ display n ++ "'" + userBug $ "There exist several components with the same name: '" ++ prettyShow n ++ "'" | otherwise -> (mb_lib, (n, redoBD c) : comps) (PDNull, x) -> x -- actually this should not happen, but let's be liberal where @@ -478,7 +492,7 @@ then DepOk else MissingDeps missingDeps -{-# DEPRECATED finalizePackageDescription "This function now always assumes tests and benchmarks are disabled; use finalizePD with ComponentRequestedSpec to specify something more specific. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED finalizePackageDescription "This function now always assumes tests and benchmarks are disabled; use finalizePD with ComponentRequestedSpec to specify something more specific. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} finalizePackageDescription :: FlagAssignment -- ^ Explicitly specified flag assignments -> (Dependency -> Bool) -- ^ Is a given dependency satisfiable from the set of diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/FieldGrammar.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/FieldGrammar.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/FieldGrammar.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/FieldGrammar.hs 2018-11-27 22:49:57.000000000 +0000 @@ -43,6 +43,7 @@ import Distribution.Compat.Prelude import Prelude () +import Distribution.CabalSpecVersion import Distribution.Compiler (CompilerFlavor (..)) import Distribution.FieldGrammar import Distribution.ModuleName (ModuleName) @@ -51,7 +52,7 @@ import Distribution.Parsec.Common import Distribution.Parsec.Newtypes import Distribution.Parsec.ParseResult -import Distribution.Text (display) +import Distribution.Pretty (prettyShow) import Distribution.Types.ExecutableScope import Distribution.Types.ForeignLib import Distribution.Types.ForeignLibType @@ -126,7 +127,7 @@ <$> monoidalFieldAla "exposed-modules" (alaList' VCat MQuoted) L.exposedModules <*> monoidalFieldAla "reexported-modules" (alaList CommaVCat) L.reexportedModules <*> monoidalFieldAla "signatures" (alaList' VCat MQuoted) L.signatures - ^^^ availableSince [2,0] [] + ^^^ availableSince CabalSpecV2_0 [] <*> booleanFieldDef "exposed" L.libExposed True <*> blurFieldGrammar L.libBuildInfo buildInfoFieldGrammar {-# SPECIALIZE libraryFieldGrammar :: Maybe UnqualComponentName -> ParsecFieldGrammar' Library #-} @@ -160,7 +161,7 @@ -- main-is is optional as conditional blocks don't have it <$> optionalFieldDefAla "main-is" FilePathNT L.modulePath "" <*> optionalFieldDef "scope" L.exeScope ExecutablePublic - ^^^ availableSince [2,0] ExecutablePublic + ^^^ availableSince CabalSpecV2_0 ExecutablePublic <*> blurFieldGrammar L.buildInfo buildInfoFieldGrammar {-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> ParsecFieldGrammar' Executable #-} {-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> PrettyFieldGrammar' Executable #-} @@ -249,10 +250,10 @@ where missingField name tt = "The '" ++ name ++ "' field is required for the " - ++ display tt ++ " test suite type." + ++ prettyShow tt ++ " test suite type." extraField name tt = "The '" ++ name ++ "' field is not used for the '" - ++ display tt ++ "' test suite type." + ++ prettyShow tt ++ "' test suite type." unvalidateTestSuite :: TestSuite -> TestSuiteStanza unvalidateTestSuite t = TestSuiteStanza @@ -337,10 +338,10 @@ where missingField name tt = "The '" ++ name ++ "' field is required for the " - ++ display tt ++ " benchmark type." + ++ prettyShow tt ++ " benchmark type." extraField name tt = "The '" ++ name ++ "' field is not used for the '" - ++ display tt ++ "' benchmark type." + ++ prettyShow tt ++ "' benchmark type." unvalidateBenchmark :: Benchmark -> BenchmarkStanza unvalidateBenchmark b = BenchmarkStanza @@ -365,7 +366,8 @@ buildInfoFieldGrammar = BuildInfo <$> booleanFieldDef "buildable" L.buildable True <*> monoidalFieldAla "build-tools" (alaList CommaFSep) L.buildTools - ^^^ deprecatedSince [2,0] "Please use 'build-tool-depends' field" + ^^^ deprecatedSince CabalSpecV2_0 + "Please use 'build-tool-depends' field" <*> monoidalFieldAla "build-tool-depends" (alaList CommaFSep) L.buildToolDepends -- {- ^^^ availableSince [2,0] [] -} -- here, we explicitly want to recognise build-tool-depends for all Cabal files @@ -377,7 +379,7 @@ <*> monoidalFieldAla "cmm-options" (alaList' NoCommaFSep Token') L.cmmOptions <*> monoidalFieldAla "cc-options" (alaList' NoCommaFSep Token') L.ccOptions <*> monoidalFieldAla "cxx-options" (alaList' NoCommaFSep Token') L.cxxOptions - ^^^ availableSince [2,1] [] -- TODO change to 2,2 when version is bumped + ^^^ availableSince CabalSpecV2_2 [] <*> monoidalFieldAla "ld-options" (alaList' NoCommaFSep Token') L.ldOptions <*> monoidalFieldAla "pkgconfig-depends" (alaList CommaFSep) L.pkgconfigDepends <*> monoidalFieldAla "frameworks" (alaList' FSep Token) L.frameworks @@ -386,23 +388,26 @@ <*> monoidalFieldAla "cmm-sources" (alaList' VCat FilePathNT) L.cmmSources <*> monoidalFieldAla "c-sources" (alaList' VCat FilePathNT) L.cSources <*> monoidalFieldAla "cxx-sources" (alaList' VCat FilePathNT) L.cxxSources - ^^^ availableSince [2,1] [] -- TODO change to 2,2 when version is bumped + ^^^ availableSince CabalSpecV2_2 [] <*> monoidalFieldAla "js-sources" (alaList' VCat FilePathNT) L.jsSources <*> hsSourceDirsGrammar <*> monoidalFieldAla "other-modules" (alaList' VCat MQuoted) L.otherModules <*> monoidalFieldAla "virtual-modules" (alaList' VCat MQuoted) L.virtualModules - ^^^ availableSince [2,1] [] -- TODO change to 2,2 when version is bumped + ^^^ availableSince CabalSpecV2_2 [] <*> monoidalFieldAla "autogen-modules" (alaList' VCat MQuoted) L.autogenModules <*> optionalFieldAla "default-language" MQuoted L.defaultLanguage <*> monoidalFieldAla "other-languages" (alaList' FSep MQuoted) L.otherLanguages <*> monoidalFieldAla "default-extensions" (alaList' FSep MQuoted) L.defaultExtensions <*> monoidalFieldAla "other-extensions" (alaList' FSep MQuoted) L.otherExtensions <*> monoidalFieldAla "extensions" (alaList' FSep MQuoted) L.oldExtensions - ^^^ deprecatedSince [1,12] "Please use 'default-extensions' or 'other-extensions' fields." + ^^^ deprecatedSince CabalSpecV1_12 + "Please use 'default-extensions' or 'other-extensions' fields." <*> monoidalFieldAla "extra-libraries" (alaList' VCat Token) L.extraLibs <*> monoidalFieldAla "extra-ghci-libraries" (alaList' VCat Token) L.extraGHCiLibs <*> monoidalFieldAla "extra-bundled-libraries" (alaList' VCat Token) L.extraBundledLibs <*> monoidalFieldAla "extra-library-flavours" (alaList' VCat Token) L.extraLibFlavours + <*> monoidalFieldAla "extra-dynamic-library-flavours" (alaList' VCat Token) L.extraDynLibFlavours + ^^^ availableSince CabalSpecV3_0 [] <*> monoidalFieldAla "extra-lib-dirs" (alaList' FSep FilePathNT) L.extraLibDirs <*> monoidalFieldAla "include-dirs" (alaList' FSep FilePathNT) L.includeDirs <*> monoidalFieldAla "includes" (alaList' FSep FilePathNT) L.includes @@ -414,7 +419,7 @@ <*> prefixedFields "x-" L.customFieldsBI <*> monoidalFieldAla "build-depends" (alaList CommaVCat) L.targetBuildDepends <*> monoidalFieldAla "mixins" (alaList CommaVCat) L.mixins - ^^^ availableSince [2,0] [] + ^^^ availableSince CabalSpecV2_0 [] {-# SPECIALIZE buildInfoFieldGrammar :: ParsecFieldGrammar' BuildInfo #-} {-# SPECIALIZE buildInfoFieldGrammar :: PrettyFieldGrammar' BuildInfo #-} @@ -423,8 +428,13 @@ => g BuildInfo [FilePath] hsSourceDirsGrammar = (++) <$> monoidalFieldAla "hs-source-dirs" (alaList' FSep FilePathNT) L.hsSourceDirs - <*> monoidalFieldAla "hs-source-dir" (alaList' FSep FilePathNT) L.hsSourceDirs - ^^^ deprecatedField' "Please use 'hs-source-dirs'" + <*> monoidalFieldAla "hs-source-dir" (alaList' FSep FilePathNT) wrongLens + --- https://github.com/haskell/cabal/commit/49e3cdae3bdf21b017ccd42e66670ca402e22b44 + ^^^ deprecatedSince CabalSpecV1_2 "Please use 'hs-source-dirs'" + where + -- TODO: make pretty printer aware of CabalSpecVersion + wrongLens :: Functor f => LensLike' f BuildInfo [FilePath] + wrongLens f bi = (\fps -> set L.hsSourceDirs fps bi) <$> f [] optionsFieldGrammar :: (FieldGrammar g, Applicative (g BuildInfo)) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/Parsec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/Parsec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/Parsec.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/Parsec.hs 2018-11-27 22:49:57.000000000 +0000 @@ -57,7 +57,6 @@ import Distribution.Parsec.ParseResult import Distribution.Pretty (prettyShow) import Distribution.Simple.Utils (fromUTF8BS) -import Distribution.Text (display) import Distribution.Types.CondTree import Distribution.Types.Dependency (Dependency) import Distribution.Types.ForeignLib @@ -100,7 +99,7 @@ setCabalSpecVersion ver -- if we get too new version, fail right away case ver of - Just v | v > mkVersion [2,4] -> parseFailure zeroPos + Just v | v > mkVersion [3,0] -> parseFailure zeroPos "Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899." _ -> pure () @@ -174,13 +173,7 @@ return v - let specVer - | cabalVer >= mkVersion [2,3] = CabalSpecV2_4 - | cabalVer >= mkVersion [2,1] = CabalSpecV2_2 - | cabalVer >= mkVersion [1,25] = CabalSpecV2_0 - | cabalVer >= mkVersion [1,23] = CabalSpecV1_24 - | cabalVer >= mkVersion [1,21] = CabalSpecV1_22 - | otherwise = CabalSpecOld + let specVer = cabalSpecFromVersionDigits (versionNumbers cabalVer) -- reset cabal version setCabalSpecVersion (Just cabalVer) @@ -220,11 +213,11 @@ ++ displaySpecVersion (specVersionRaw pkg) ++ "' must use section syntax. See the Cabal user guide for details." where - displaySpecVersion (Left version) = display version + displaySpecVersion (Left version) = prettyShow version displaySpecVersion (Right versionRange) = case asVersionIntervals versionRange of - [] {- impossible -} -> display versionRange - ((LowerBound version _, _):_) -> display (orLaterVersion version) + [] {- impossible -} -> prettyShow versionRange + ((LowerBound version _, _):_) -> prettyShow (orLaterVersion version) maybeWarnCabalVersion _ _ = return () @@ -288,11 +281,11 @@ let hasType ts = foreignLibType ts /= foreignLibType mempty unless (onAllBranches hasType flib) $ lift $ parseFailure pos $ concat - [ "Foreign library " ++ show (display name') + [ "Foreign library " ++ show (prettyShow name') , " is missing required field \"type\" or the field " , "is not present in all conditional branches. The " , "available test types are: " - , intercalate ", " (map display knownForeignLibTypes) + , intercalate ", " (map prettyShow knownForeignLibTypes) ] -- TODO check duplicate name here? @@ -313,11 +306,11 @@ let hasType ts = testInterface ts /= testInterface mempty unless (onAllBranches hasType testSuite) $ lift $ parseFailure pos $ concat - [ "Test suite " ++ show (display name') + [ "Test suite " ++ show (prettyShow name') , " is missing required field \"type\" or the field " , "is not present in all conditional branches. The " , "available test types are: " - , intercalate ", " (map display knownTestTypes) + , intercalate ", " (map prettyShow knownTestTypes) ] -- TODO check duplicate name here? @@ -331,11 +324,11 @@ let hasType ts = benchmarkInterface ts /= benchmarkInterface mempty unless (onAllBranches hasType bench) $ lift $ parseFailure pos $ concat - [ "Benchmark " ++ show (display name') + [ "Benchmark " ++ show (prettyShow name') , " is missing required field \"type\" or the field " , "is not present in all conditional branches. The " , "available benchmark types are: " - , intercalate ", " (map display knownBenchmarkTypes) + , intercalate ", " (map prettyShow knownBenchmarkTypes) ] -- TODO check duplicate name here? @@ -343,7 +336,7 @@ | name == "flag" = do name' <- parseNameBS pos args - name'' <- lift $ runFieldParser' pos parsec specVer (fieldLineStreamFromBS name') `recoverWith` mkFlagName "" + name'' <- lift $ runFieldParser' [pos] parsec specVer (fieldLineStreamFromBS name') `recoverWith` mkFlagName "" flag <- lift $ parseFields specVer fields (flagFieldGrammar name'') -- Check default flag stateGpd . L.genPackageFlags %= snoc flag @@ -355,7 +348,7 @@ | name == "source-repository" = do kind <- lift $ case args of [SecArgName spos secName] -> - runFieldParser' spos parsec specVer (fieldLineStreamFromBS secName) `recoverWith` RepoHead + runFieldParser' [spos] parsec specVer (fieldLineStreamFromBS secName) `recoverWith` RepoHead [] -> do parseFailure pos "'source-repository' requires exactly one argument" pure RepoHead diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/PrettyPrint.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/PrettyPrint.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription/PrettyPrint.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription/PrettyPrint.hs 2018-11-27 22:49:57.000000000 +0000 @@ -37,7 +37,7 @@ import Distribution.PackageDescription import Distribution.Simple.Utils import Distribution.ParseUtils -import Distribution.Text +import Distribution.Pretty import Distribution.FieldGrammar (PrettyFieldGrammar', prettyFieldGrammar) import Distribution.PackageDescription.FieldGrammar @@ -85,7 +85,7 @@ ppSourceRepo :: SourceRepo -> Doc ppSourceRepo repo = - emptyLine $ text "source-repository" <+> disp kind $+$ + emptyLine $ text "source-repository" <+> pretty kind $+$ nest indentWith (prettyFieldGrammar (sourceRepoFieldGrammar kind) repo) where kind = repoKind repo @@ -140,35 +140,35 @@ ppCondSubLibraries :: [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -> Doc ppCondSubLibraries libs = vcat - [ emptyLine $ (text "library" <+> disp n) $+$ + [ emptyLine $ (text "library" <+> pretty n) $+$ nest indentWith (ppCondTree2 (libraryFieldGrammar $ Just n) condTree) | (n, condTree) <- libs ] ppCondForeignLibs :: [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] -> Doc ppCondForeignLibs flibs = vcat - [ emptyLine $ (text "foreign-library" <+> disp n) $+$ + [ emptyLine $ (text "foreign-library" <+> pretty n) $+$ nest indentWith (ppCondTree2 (foreignLibFieldGrammar n) condTree) | (n, condTree) <- flibs ] ppCondExecutables :: [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] -> Doc ppCondExecutables exes = vcat - [ emptyLine $ (text "executable" <+> disp n) $+$ + [ emptyLine $ (text "executable" <+> pretty n) $+$ nest indentWith (ppCondTree2 (executableFieldGrammar n) condTree) | (n, condTree) <- exes ] ppCondTestSuites :: [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] -> Doc ppCondTestSuites suites = vcat - [ emptyLine $ (text "test-suite" <+> disp n) $+$ + [ emptyLine $ (text "test-suite" <+> pretty n) $+$ nest indentWith (ppCondTree2 testSuiteFieldGrammar (fmap FG.unvalidateTestSuite condTree)) | (n, condTree) <- suites ] ppCondBenchmarks :: [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] -> Doc ppCondBenchmarks suites = vcat - [ emptyLine $ (text "benchmark" <+> disp n) $+$ + [ emptyLine $ (text "benchmark" <+> pretty n) $+$ nest indentWith (ppCondTree2 benchmarkFieldGrammar (fmap FG.unvalidateBenchmark condTree)) | (n, condTree) <- suites ] @@ -182,10 +182,10 @@ ppCondition (CAnd c1 c2) = parens (hsep [ppCondition c1, text "&&" <+> ppCondition c2]) ppConfVar :: ConfVar -> Doc -ppConfVar (OS os) = text "os" <<>> parens (disp os) -ppConfVar (Arch arch) = text "arch" <<>> parens (disp arch) +ppConfVar (OS os) = text "os" <<>> parens (pretty os) +ppConfVar (Arch arch) = text "arch" <<>> parens (pretty arch) ppConfVar (Flag name) = text "flag" <<>> parens (ppFlagName name) -ppConfVar (Impl c v) = text "impl" <<>> parens (disp c <+> disp v) +ppConfVar (Impl c v) = text "impl" <<>> parens (pretty c <+> pretty v) ppFlagName :: FlagName -> Doc ppFlagName = text . unFlagName @@ -240,7 +240,7 @@ maybe mempty (prettyFieldGrammar buildInfoFieldGrammar) mb_lib_bi $$ vcat [ space - $$ (text "executable:" <+> disp name) + $$ (text "executable:" <+> pretty name) $$ prettyFieldGrammar buildInfoFieldGrammar bi | (name, bi) <- ex_bis ] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PackageDescription.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PackageDescription.hs 2018-11-27 22:49:57.000000000 +0000 @@ -86,6 +86,7 @@ allBuildDepends, enabledBuildDepends, ComponentName(..), + LibraryName(..), defaultLibName, HookedBuildInfo, emptyHookedBuildInfo, @@ -135,5 +136,6 @@ import Distribution.Types.Condition import Distribution.Types.PackageDescription import Distribution.Types.ComponentName +import Distribution.Types.LibraryName import Distribution.Types.HookedBuildInfo import Distribution.Types.SourceRepo diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Package.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Package.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Package.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Package.hs 2018-11-27 22:49:57.000000000 +0000 @@ -87,7 +87,7 @@ class Package pkg => HasUnitId pkg where installedUnitId :: pkg -> UnitId -{-# DEPRECATED installedPackageId "Use installedUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED installedPackageId "Use installedUnitId instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} -- | Compatibility wrapper for Cabal pre-1.24. installedPackageId :: HasUnitId pkg => pkg -> UnitId installedPackageId = installedUnitId diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Parsec/Class.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Parsec/Class.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Parsec/Class.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Parsec/Class.hs 2018-11-27 22:49:57.000000000 +0000 @@ -142,7 +142,10 @@ string = liftParsec . P.string instance CabalParsing ParsecParser where - parsecWarning t w = liftParsec $ Parsec.modifyState (PWarning t (Position 0 0) w :) + parsecWarning t w = liftParsec $ do + spos <- Parsec.getPosition + Parsec.modifyState + (PWarning t (Position (Parsec.sourceLine spos) (Parsec.sourceColumn spos)) w :) askCabalSpecVersion = PP pure -- | Parse a 'String' with 'lexemeParsec'. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PrettyUtils.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PrettyUtils.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/PrettyUtils.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/PrettyUtils.hs 2018-11-27 22:49:57.000000000 +0000 @@ -9,7 +9,7 @@ -- -- Utilities for pretty printing. {-# OPTIONS_HADDOCK hide #-} -module Distribution.PrettyUtils {-# DEPRECATED "Use Distribution.Pretty. This module will be removed in Cabal-3.0 (est. Oct 2018)." #-} ( +module Distribution.PrettyUtils {-# DEPRECATED "Use Distribution.Pretty. This module will be removed in Cabal-3.0 (est. Mar 2019)." #-} ( Separator, -- * Internal showFilePath, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/ReadE.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/ReadE.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/ReadE.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/ReadE.hs 2018-11-27 22:49:57.000000000 +0000 @@ -48,7 +48,7 @@ readEOrFail :: ReadE a -> String -> a readEOrFail r = either error id . runReadE r --- {-# DEPRECATED readP_to_E "Use parsecToReadE. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +-- {-# DEPRECATED readP_to_E "Use parsecToReadE. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} readP_to_E :: (String -> ErrorMsg) -> ReadP a a -> ReadE a readP_to_E err r = ReadE $ \txt -> case [ p | (p, s) <- readP_to_S r txt diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Build.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Build.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Build.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Build.hs 2018-11-27 22:49:57.000000000 +0000 @@ -470,7 +470,7 @@ , componentInternalDeps = componentInternalDeps clbi , componentIsIndefinite_ = False , componentExeDeps = componentExeDeps clbi - , componentLocalName = CSubLibName (testName test) + , componentLocalName = CLibName $ LSubLibName $ testName test , componentIsPublic = False , componentIncludes = componentIncludes clbi , componentUnitId = componentUnitId clbi @@ -688,6 +688,7 @@ ModuleName.toFilePath mod_name <.> "hsig" createDirectoryIfMissingVerbose verbosity True (takeDirectory sigPath) rewriteFileEx verbosity sigPath $ + "{-# OPTIONS_GHC -w #-}\n" ++ "{-# LANGUAGE NoImplicitPrelude #-}\n" ++ "signature " ++ prettyShow mod_name ++ " where" _ -> return () diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/BuildPaths.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/BuildPaths.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/BuildPaths.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/BuildPaths.hs 2018-11-27 22:49:57.000000000 +0000 @@ -196,7 +196,7 @@ mkProfLibName :: UnitId -> String mkProfLibName lib = mkGenericStaticLibName (getHSLibraryName lib ++ "_p") --- | Create a library name for a shared lirbary from a given name. +-- | Create a library name for a shared library from a given name. -- Prepends 'lib' and appends the '-' -- as well as the shared library extension. mkGenericSharedLibName :: Platform -> CompilerId -> String -> String diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/BuildTarget.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/BuildTarget.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/BuildTarget.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/BuildTarget.hs 2018-11-27 22:49:57.000000000 +0000 @@ -502,8 +502,8 @@ , let bi = componentBuildInfo c ] componentStringName :: Package pkg => pkg -> ComponentName -> ComponentStringName -componentStringName pkg CLibName = prettyShow (packageName pkg) -componentStringName _ (CSubLibName name) = unUnqualComponentName name +componentStringName pkg (CLibName LMainLibName ) = prettyShow (packageName pkg) +componentStringName _ (CLibName (LSubLibName name)) = unUnqualComponentName name componentStringName _ (CFLibName name) = unUnqualComponentName name componentStringName _ (CExeName name) = unUnqualComponentName name componentStringName _ (CTestName name) = unUnqualComponentName name @@ -555,8 +555,7 @@ deriving (Eq, Ord, Show) componentKind :: ComponentName -> ComponentKind -componentKind CLibName = LibKind -componentKind (CSubLibName _) = LibKind +componentKind (CLibName _) = LibKind componentKind (CFLibName _) = FLibKind componentKind (CExeName _) = ExeKind componentKind (CTestName _) = TestKind diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Configure.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Configure.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Configure.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Configure.hs 2018-11-27 22:49:57.000000000 +0000 @@ -88,6 +88,7 @@ import Distribution.Types.ForeignLib import Distribution.Types.ForeignLibType import Distribution.Types.ForeignLibOption +import Distribution.Types.GivenComponent import Distribution.Types.Mixin import Distribution.Types.UnqualComponentName import Distribution.Simple.Utils @@ -142,6 +143,8 @@ import Distribution.Compat.Environment ( lookupEnv ) import Distribution.Compat.Exception ( catchExit, catchIO ) +import qualified Data.Set as Set + type UseExternalInternalDeps = Bool @@ -438,7 +441,7 @@ -- that is not possible to configure a test-suite to use one -- version of a dependency, and the executable to use another. (allConstraints :: [Dependency], - requiredDepsMap :: Map PackageName InstalledPackageInfo) + requiredDepsMap :: Map (PackageName, ComponentName) InstalledPackageInfo) <- either (die' verbosity) return $ combinedConstraints (configConstraints cfg) (configDependencies cfg) @@ -868,12 +871,12 @@ -> PackageName -> InstalledPackageIndex -- ^ installed set -> Map PackageName (Maybe UnqualComponentName) -- ^ internal set - -> Map PackageName InstalledPackageInfo -- ^ required dependencies + -> Map (PackageName, ComponentName) InstalledPackageInfo -- ^ required dependencies -> (Dependency -> Bool) dependencySatisfiable use_external_internal_deps exact_config pn installedPackageSet internalPackageSet requiredDepsMap - d@(Dependency depName vr) + (Dependency depName vr sublibs) | exact_config -- When we're given '--exact-configuration', we assume that all @@ -888,7 +891,19 @@ -- Except for internal deps, when we're NOT per-component mode; -- those are just True. then True - else depName `Map.member` requiredDepsMap + else + -- Backward compatibility for the old sublibrary syntax + (sublibs == Set.singleton LMainLibName + && Map.member + (pn, CLibName $ LSubLibName $ packageNameToUnqualComponentName depName) + requiredDepsMap) + + || all + (\lib -> + (depName, CLibName lib) + `Map.member` + requiredDepsMap) + sublibs | isInternalDep = if use_external_internal_deps @@ -907,18 +922,18 @@ isInternalDep = Map.member depName internalPackageSet depSatisfiable = - not . null $ PackageIndex.lookupDependency installedPackageSet d + not . null $ PackageIndex.lookupDependency installedPackageSet depName vr internalDepSatisfiable = not . null $ PackageIndex.lookupInternalDependency - installedPackageSet (Dependency pn vr) cn + installedPackageSet pn vr cn where cn | pn == depName = Nothing | otherwise -- Reinterpret the "package name" as an unqualified component -- name - = Just (mkUnqualComponentName (unPackageName depName)) + = Just $ packageNameToUnqualComponentName depName -- | Finalize a generic package description. The workhorse is -- 'finalizePD' but there's a bit of other nattering @@ -1016,7 +1031,7 @@ -> UseExternalInternalDeps -> Map PackageName (Maybe UnqualComponentName) -- ^ internal packages -> InstalledPackageIndex -- ^ installed packages - -> Map PackageName InstalledPackageInfo -- ^ required deps + -> Map (PackageName, ComponentName) InstalledPackageInfo -- ^ required deps -> PackageDescription -> ComponentRequestedSpec -> IO [PreExistingComponent] @@ -1024,8 +1039,8 @@ internalPackageSet installedPackageSet requiredDepsMap pkg_descr enableSpec = do let failedDeps :: [FailedDependency] allPkgDeps :: [ResolvedDependency] - (failedDeps, allPkgDeps) = partitionEithers - [ (\s -> (dep, s)) <$> status + (failedDeps, allPkgDeps) = partitionEithers $ concat + [ fmap (\s -> (dep, s)) <$> status | dep <- enabledBuildDepends pkg_descr enableSpec , let status = selectDependency (package pkg_descr) internalPackageSet installedPackageSet @@ -1190,16 +1205,16 @@ selectDependency :: PackageId -- ^ Package id of current package -> Map PackageName (Maybe UnqualComponentName) -> InstalledPackageIndex -- ^ Installed packages - -> Map PackageName InstalledPackageInfo + -> Map (PackageName, ComponentName) InstalledPackageInfo -- ^ Packages for which we have been given specific deps to -- use -> UseExternalInternalDeps -- ^ Are we configuring a -- single component? -> Dependency - -> Either FailedDependency DependencyResolution + -> [Either FailedDependency DependencyResolution] selectDependency pkgid internalIndex installedIndex requiredDepsMap use_external_internal_deps - dep@(Dependency dep_pkgname vr) = + (Dependency dep_pkgname vr libs) = -- If the dependency specification matches anything in the internal package -- index, then we prefer that match to anything in the second. -- For example: @@ -1215,18 +1230,19 @@ -- even if there is a newer installed library "MyLibrary-0.2". case Map.lookup dep_pkgname internalIndex of Just cname -> if use_external_internal_deps - then do_external (Just cname) + then do_external (Just cname) <$> Set.toList libs else do_internal - _ -> do_external Nothing + _ -> do_external Nothing <$> Set.toList libs where -- It's an internal library, and we're not per-component build - do_internal = Right $ InternalDependency - $ PackageIdentifier dep_pkgname $ packageVersion pkgid + do_internal = [Right $ InternalDependency + $ PackageIdentifier dep_pkgname $ packageVersion pkgid] -- We have to look it up externally - do_external is_internal = do - ipi <- case Map.lookup dep_pkgname requiredDepsMap of + do_external :: Maybe (Maybe UnqualComponentName) -> LibraryName -> Either FailedDependency DependencyResolution + do_external is_internal lib = do + ipi <- case Map.lookup (dep_pkgname, CLibName lib) requiredDepsMap of -- If we know the exact pkg to use, then use it. Just pkginstance -> Right pkginstance -- Otherwise we just pick an arbitrary instance of the latest version. @@ -1238,14 +1254,14 @@ -- It's an external package, normal situation do_external_external = - case PackageIndex.lookupDependency installedIndex dep of + case PackageIndex.lookupDependency installedIndex dep_pkgname vr of [] -> Left (DependencyNotExists dep_pkgname) pkgs -> Right $ head $ snd $ last pkgs -- It's an internal library, being looked up externally do_external_internal mb_uqn = case PackageIndex.lookupInternalDependency installedIndex - (Dependency (packageName pkgid) vr) mb_uqn of + (packageName pkgid) vr mb_uqn of [] -> Left (DependencyMissingInternal dep_pkgname (packageName pkgid)) pkgs -> Right $ head $ snd $ last pkgs @@ -1377,10 +1393,10 @@ -- deps in the end. So we still need to remember which installed packages to -- pick. combinedConstraints :: [Dependency] -> - [(PackageName, ComponentId)] -> + [GivenComponent] -> InstalledPackageIndex -> Either String ([Dependency], - Map PackageName InstalledPackageInfo) + Map (PackageName, ComponentName) InstalledPackageInfo) combinedConstraints constraints dependencies installedPackages = do when (not (null badComponentIds)) $ @@ -1396,21 +1412,21 @@ allConstraints :: [Dependency] allConstraints = constraints ++ [ thisPackageVersion (packageId pkg) - | (_, _, Just pkg) <- dependenciesPkgInfo ] + | (_, _, _, Just pkg) <- dependenciesPkgInfo ] - idConstraintMap :: Map PackageName InstalledPackageInfo + idConstraintMap :: Map (PackageName, ComponentName) InstalledPackageInfo idConstraintMap = Map.fromList -- NB: do NOT use the packageName from -- dependenciesPkgInfo! - [ (pn, pkg) - | (pn, _, Just pkg) <- dependenciesPkgInfo ] + [ ((pn, cname), pkg) + | (pn, cname, _, Just pkg) <- dependenciesPkgInfo ] -- The dependencies along with the installed package info, if it exists - dependenciesPkgInfo :: [(PackageName, ComponentId, + dependenciesPkgInfo :: [(PackageName, ComponentName, ComponentId, Maybe InstalledPackageInfo)] dependenciesPkgInfo = - [ (pkgname, cid, mpkg) - | (pkgname, cid) <- dependencies + [ (pkgname, CLibName lname, cid, mpkg) + | GivenComponent pkgname lname cid <- dependencies , let mpkg = PackageIndex.lookupComponentId installedPackages cid ] @@ -1419,13 +1435,19 @@ -- (i.e. someone has written a hash) and didn't find it then it's -- an error. badComponentIds = - [ (pkgname, cid) - | (pkgname, cid, Nothing) <- dependenciesPkgInfo ] + [ (pkgname, cname, cid) + | (pkgname, cname, cid, Nothing) <- dependenciesPkgInfo ] dispDependencies deps = hsep [ text "--dependency=" - <<>> quotes (pretty pkgname <<>> char '=' <<>> pretty cid) - | (pkgname, cid) <- deps ] + <<>> quotes + (pretty pkgname + <<>> case cname of CLibName LMainLibName -> "" + CLibName (LSubLibName n) -> ":" <<>> pretty n + _ -> ":" <<>> pretty cname + <<>> char '=' + <<>> pretty cid) + | (pkgname, cname, cid) <- deps ] -- ----------------------------------------------------------------------------- -- Configuring program dependencies diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Doctest.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Doctest.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Doctest.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Doctest.hs 2018-11-27 22:49:57.000000000 +0000 @@ -136,7 +136,7 @@ then return vanillaOpts else if withSharedLib lbi then return sharedOpts - else die' verbosity $ "Must have vanilla or shared lirbaries " + else die' verbosity $ "Must have vanilla or shared libraries " ++ "enabled in order to run doctest" ghcVersion <- maybe (die' verbosity "Compiler has no GHC version") return diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHC/EnvironmentParser.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHC/EnvironmentParser.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHC/EnvironmentParser.hs 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHC/EnvironmentParser.hs 2018-11-27 22:49:58.000000000 +0000 @@ -4,7 +4,7 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} -module Distribution.Simple.GHC.EnvironmentParser +module Distribution.Simple.GHC.EnvironmentParser ( parseGhcEnvironmentFile, readGhcEnvironmentFile, ParseErrorExc(..) ) where import Prelude () @@ -20,7 +20,7 @@ import Control.Exception ( Exception, throwIO ) import qualified Text.Parsec as P -import Text.Parsec.String +import Text.Parsec.String ( Parser, parseFromFile ) parseEnvironmentFileLine :: Parser GhcEnvironmentFileEntry @@ -30,7 +30,7 @@ <|> pure GhcEnvFileClearPackageDbStack <* clearDb where comment = P.string "--" *> P.many (P.noneOf "\r\n") - unitId = P.try $ P.string "package-id" *> P.spaces *> + unitId = P.try $ P.string "package-id" *> P.spaces *> (mkUnitId <$> P.many1 (P.satisfy $ \c -> isAlphaNum c || c `elem` "-_.+")) packageDb = (P.string "global-package-db" *> pure GlobalPackageDB) <|> (P.string "user-package-db" *> pure UserPackageDB) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHC/Internal.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHC/Internal.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHC/Internal.hs 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHC/Internal.hs 2018-11-27 22:49:58.000000000 +0000 @@ -22,6 +22,7 @@ componentCxxGhcOptions, componentGhcOptions, mkGHCiLibName, + mkGHCiProfLibName, filterGhciFlags, ghcLookupProperty, getHaskellObjects, @@ -420,6 +421,9 @@ mkGHCiLibName :: UnitId -> String mkGHCiLibName lib = getHSLibraryName lib <.> "o" +mkGHCiProfLibName :: UnitId -> String +mkGHCiProfLibName lib = getHSLibraryName lib <.> "p_o" + ghcLookupProperty :: String -> Compiler -> Bool ghcLookupProperty prop comp = case Map.lookup prop (compilerProperties comp) of @@ -607,4 +611,3 @@ UserPackageDB -> "user-package-db" SpecificPackageDB dbfile -> "package-db " ++ dbfile GhcEnvFileClearPackageDbStack -> "clear-package-db" - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHC.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHC.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHC.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHC.hs 2018-11-27 22:49:57.000000000 +0000 @@ -423,7 +423,7 @@ | GlobalPackageDB `notElem` rest = die' verbosity $ "With current ghc versions the global package db is always used " ++ "and must be listed first. This ghc limitation is lifted in GHC 7.6," - ++ "see http://hackage.haskell.org/trac/ghc/ticket/5977" + ++ "see http://ghc.haskell.org/trac/ghc/ticket/5977" checkPackageDbStackPre76 verbosity _ = die' verbosity $ "If the global package db is specified, it must be " ++ "specified first and cannot be specified multiple times" @@ -503,7 +503,7 @@ when (forceShared || withSharedLib lbi) whenStaticLib forceStatic = when (forceStatic || withStaticLib lbi) - whenGHCiLib = when (withGHCiLib lbi && withVanillaLib lbi) + whenGHCiLib = when (withGHCiLib lbi) forRepl = maybe False (const True) mReplFlags ifReplLib = when forRepl replFlags = fromMaybe mempty mReplFlags @@ -708,6 +708,7 @@ sharedLibFilePath = libTargetDir mkSharedLibName (hostPlatform lbi) compiler_id uid staticLibFilePath = libTargetDir mkStaticLibName (hostPlatform lbi) compiler_id uid ghciLibFilePath = libTargetDir Internal.mkGHCiLibName uid + ghciProfLibFilePath = libTargetDir Internal.mkGHCiProfLibName uid libInstallPath = libdir $ absoluteComponentInstallDirs pkg_descr lbi uid NoCopyDest sharedLibInstallPath = libInstallPath mkSharedLibName (hostPlatform lbi) compiler_id uid @@ -751,10 +752,6 @@ hProfObjs ++ map (libTargetDir ) cProfObjs ++ stubProfObjs - ghciObjFiles = - hObjs - ++ map (libTargetDir ) cObjs - ++ stubObjs dynamicObjectFiles = hSharedObjs ++ map (libTargetDir ) cSharedObjs @@ -833,16 +830,19 @@ info verbosity (show (ghcOptPackages ghcSharedLinkArgs)) - whenVanillaLib False $ + whenVanillaLib False $ do Ar.createArLibArchive verbosity lbi vanillaLibFilePath staticObjectFiles + whenGHCiLib $ do + (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) + Ld.combineObjectFiles verbosity lbi ldProg + ghciLibFilePath staticObjectFiles - whenProfLib $ + whenProfLib $ do Ar.createArLibArchive verbosity lbi profileLibFilePath profObjectFiles - - whenGHCiLib $ do - (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) - Ld.combineObjectFiles verbosity lbi ldProg - ghciLibFilePath ghciObjFiles + whenGHCiLib $ do + (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) + Ld.combineObjectFiles verbosity lbi ldProg + ghciProfLibFilePath profObjectFiles whenSharedLib False $ runGhcProg ghcSharedLinkArgs @@ -1836,9 +1836,16 @@ | l <- getHSLibraryName (componentUnitId clbi):(extraBundledLibs (libBuildInfo lib)) , f <- "":extraLibFlavours (libBuildInfo lib) ] - whenProf $ installOrdinary builtDir targetDir profileLibName - whenGHCi $ installOrdinary builtDir targetDir ghciLibName - whenShared $ installShared builtDir dynlibTargetDir sharedLibName + whenGHCi $ installOrdinary builtDir targetDir ghciLibName + whenProf $ do + installOrdinary builtDir targetDir profileLibName + whenGHCi $ installOrdinary builtDir targetDir ghciProfLibName + whenShared $ + sequence_ [ installShared builtDir dynlibTargetDir + (mkGenericSharedLibName platform compiler_id (l ++ f)) + | l <- getHSLibraryName uid : extraBundledLibs (libBuildInfo lib) + , f <- "":extraDynLibFlavours (libBuildInfo lib) + ] where builtDir = componentBuildDir lbi clbi @@ -1854,7 +1861,7 @@ else installOrdinaryFile verbosity src dst when (stripLibs lbi) $ Strip.stripLib verbosity - (hostPlatform lbi) (withPrograms lbi) dst + platform (withPrograms lbi) dst installOrdinary = install False installShared = install True @@ -1864,10 +1871,11 @@ >>= installOrdinaryFiles verbosity targetDir compiler_id = compilerId (compiler lbi) + platform = hostPlatform lbi uid = componentUnitId clbi profileLibName = mkProfLibName uid ghciLibName = Internal.mkGHCiLibName uid - sharedLibName = (mkSharedLibName (hostPlatform lbi) compiler_id) uid + ghciProfLibName = Internal.mkGHCiProfLibName uid hasLib = not $ null (allLibModules lib clbi) && null (cSources (libBuildInfo lib)) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHCJS.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHCJS.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/GHCJS.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/GHCJS.hs 2018-11-27 22:49:57.000000000 +0000 @@ -222,7 +222,7 @@ | GlobalPackageDB `notElem` rest = die' verbosity $ "With current ghc versions the global package db is always used " ++ "and must be listed first. This ghc limitation may be lifted in " - ++ "future, see http://hackage.haskell.org/trac/ghc/ticket/5977" + ++ "future, see http://ghc.haskell.org/trac/ghc/ticket/5977" checkPackageDbStack verbosity _ = die' verbosity $ "If the global package db is specified, it must be " ++ "specified first and cannot be specified multiple times" @@ -282,7 +282,7 @@ whenProfLib = when (not forRepl && withProfLib lbi) whenSharedLib forceShared = when (not forRepl && (forceShared || withSharedLib lbi)) - whenGHCiLib = when (not forRepl && withGHCiLib lbi && withVanillaLib lbi) + whenGHCiLib = when (not forRepl && withGHCiLib lbi) forRepl = maybe False (const True) mReplFlags ifReplLib = when forRepl replFlags = fromMaybe mempty mReplFlags @@ -435,6 +435,7 @@ profileLibFilePath = libTargetDir mkProfLibName uid sharedLibFilePath = libTargetDir mkSharedLibName (hostPlatform lbi) compiler_id uid ghciLibFilePath = libTargetDir Internal.mkGHCiLibName uid + ghciProfLibFilePath = libTargetDir Internal.mkGHCiProfLibName uid hObjs <- Internal.getHaskellObjects implInfo lib lbi clbi libTargetDir objExtension True @@ -457,9 +458,6 @@ profObjectFiles = hProfObjs ++ map (libTargetDir ) cProfObjs - ghciObjFiles = - hObjs - ++ map (libTargetDir ) cObjs dynamicObjectFiles = hSharedObjs ++ map (libTargetDir ) cSharedObjs @@ -483,14 +481,17 @@ whenVanillaLib False $ do Ar.createArLibArchive verbosity lbi vanillaLibFilePath staticObjectFiles + whenGHCiLib $ do + (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) + Ld.combineObjectFiles verbosity lbi ldProg + ghciLibFilePath staticObjectFiles whenProfLib $ do Ar.createArLibArchive verbosity lbi profileLibFilePath profObjectFiles - - whenGHCiLib $ do - (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) - Ld.combineObjectFiles verbosity lbi ldProg - ghciLibFilePath ghciObjFiles + whenGHCiLib $ do + (ldProg, _) <- requireProgram verbosity ldProgram (withPrograms lbi) + Ld.combineObjectFiles verbosity lbi ldProg + ghciProfLibFilePath profObjectFiles whenSharedLib False $ runGhcjsProg ghcSharedLinkArgs @@ -713,10 +714,13 @@ whenShared $ copyModuleFiles "dyn_hi" -- copy the built library files over: - whenVanilla $ installOrdinaryNative builtDir targetDir vanillaLibName - whenProf $ installOrdinaryNative builtDir targetDir profileLibName - whenGHCi $ installOrdinaryNative builtDir targetDir ghciLibName - whenShared $ installSharedNative builtDir dynlibTargetDir sharedLibName + whenVanilla $ do + installOrdinaryNative builtDir targetDir vanillaLibName + whenGHCi $ installOrdinaryNative builtDir targetDir ghciLibName + whenProf $ do + installOrdinaryNative builtDir targetDir profileLibName + whenGHCi $ installOrdinaryNative builtDir targetDir ghciProfLibName + whenShared $ installSharedNative builtDir dynlibTargetDir sharedLibName where install isShared isJS srcDir dstDir name = do @@ -747,6 +751,7 @@ vanillaLibName = mkLibName uid profileLibName = mkProfLibName uid ghciLibName = Internal.mkGHCiLibName uid + ghciProfLibName = Internal.mkGHCiProfLibName uid sharedLibName = (mkSharedLibName (hostPlatform lbi) compiler_id) uid hasLib = not $ null (allLibModules lib clbi) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/LocalBuildInfo.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/LocalBuildInfo.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/LocalBuildInfo.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/LocalBuildInfo.hs 2018-11-27 22:49:57.000000000 +0000 @@ -29,6 +29,7 @@ -- * Buildable package components Component(..), ComponentName(..), + LibraryName(..), defaultLibName, showComponentName, componentNameString, @@ -108,11 +109,11 @@ componentBuildDir lbi clbi = buildDir lbi case componentLocalName clbi of - CLibName -> + CLibName LMainLibName -> if prettyShow (componentUnitId clbi) == prettyShow (componentComponentId clbi) then "" else prettyShow (componentUnitId clbi) - CSubLibName s -> + CLibName (LSubLibName s) -> if prettyShow (componentUnitId clbi) == prettyShow (componentComponentId clbi) then unUnqualComponentName s else prettyShow (componentUnitId clbi) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/PackageIndex.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/PackageIndex.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/PackageIndex.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/PackageIndex.hs 2018-11-27 22:49:57.000000000 +0000 @@ -303,7 +303,7 @@ . List.deleteBy (\_ pkg -> installedUnitId pkg == ipkgid) undefined -- | Backwards compatibility wrapper for Cabal pre-1.24. -{-# DEPRECATED deleteInstalledPackageId "Use deleteUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED deleteInstalledPackageId "Use deleteUnitId instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} deleteInstalledPackageId :: UnitId -> InstalledPackageIndex -> InstalledPackageIndex deleteInstalledPackageId = deleteUnitId @@ -419,7 +419,7 @@ Map.lookup (newSimpleUnitId cid) (unitIdIndex index) -- | Backwards compatibility for Cabal pre-1.24. -{-# DEPRECATED lookupInstalledPackageId "Use lookupUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED lookupInstalledPackageId "Use lookupUnitId instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} lookupInstalledPackageId :: PackageIndex a -> UnitId -> Maybe a lookupInstalledPackageId = lookupUnitId @@ -469,11 +469,11 @@ -- -- INVARIANT: List of eligible 'IPI.InstalledPackageInfo' is non-empty. -- -lookupDependency :: InstalledPackageIndex -> Dependency +lookupDependency :: InstalledPackageIndex -> PackageName -> VersionRange -> [(Version, [IPI.InstalledPackageInfo])] -lookupDependency index dep = +lookupDependency index pn vr = -- Yes, a little bit of a misnomer here! - lookupInternalDependency index dep Nothing + lookupInternalDependency index pn vr Nothing -- | Does a lookup by source package name and a range of versions. -- @@ -482,10 +482,10 @@ -- -- INVARIANT: List of eligible 'IPI.InstalledPackageInfo' is non-empty. -- -lookupInternalDependency :: InstalledPackageIndex -> Dependency +lookupInternalDependency :: InstalledPackageIndex -> PackageName -> VersionRange -> Maybe UnqualComponentName -> [(Version, [IPI.InstalledPackageInfo])] -lookupInternalDependency index (Dependency name versionRange) libn = +lookupInternalDependency index name versionRange libn = case Map.lookup (name, libn) (packageIdIndex index) of Nothing -> [] Just pvers -> [ (ver, pkgs') diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Program/GHC.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Program/GHC.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Program/GHC.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Program/GHC.hs 2018-11-27 22:49:57.000000000 +0000 @@ -2,6 +2,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} module Distribution.Simple.Program.GHC ( GhcOptions(..), @@ -42,58 +43,73 @@ import Data.List (stripPrefix) import qualified Data.Map as Map -import Data.Monoid (All(..), Any(..), Endo(..), First(..)) +import Data.Monoid (All(..), Any(..), Endo(..), First(..), Last(..)) import Data.Set (Set) import qualified Data.Set as Set normaliseGhcArgs :: Maybe Version -> PackageDescription -> [String] -> [String] normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs | ghcVersion `withinRange` supportedGHCVersions - = argumentFilters $ filter simpleFilters ghcArgs + = argumentFilters . filter simpleFilters . filterRtsOpts $ ghcArgs where supportedGHCVersions :: VersionRange supportedGHCVersions = intersectVersionRanges (orLaterVersion (mkVersion [8,0])) - (earlierVersion (mkVersion [8,5])) + (earlierVersion (mkVersion [8,7])) from :: Monoid m => [Int] -> m -> m from version flags | ghcVersion `withinRange` orLaterVersion (mkVersion version) = flags | otherwise = mempty - checkComponentWarnings :: (a -> BuildInfo) -> [a] -> All - checkComponentWarnings getInfo = foldMap $ checkComponent . getInfo + to :: Monoid m => [Int] -> m -> m + to version flags + | ghcVersion `withinRange` earlierVersion (mkVersion version) = flags + | otherwise = mempty + + checkGhcFlags :: forall m . Monoid m => ([String] -> m) -> m + checkGhcFlags fun = mconcat + [ fun ghcArgs + , checkComponentFlags libBuildInfo pkgLibs + , checkComponentFlags buildInfo executables + , checkComponentFlags testBuildInfo testSuites + , checkComponentFlags benchmarkBuildInfo benchmarks + ] where - checkComponent :: BuildInfo -> All - checkComponent = - foldMap checkWarnings . filterGhcOptions . allBuildInfoOptions - - allBuildInfoOptions :: BuildInfo -> [(CompilerFlavor, [String])] - allBuildInfoOptions = - mconcat [options, profOptions, sharedOptions, staticOptions] - - filterGhcOptions :: [(CompilerFlavor, [String])] -> [[String]] - filterGhcOptions l = [opts | (GHC, opts) <- l] - - libs, exes, tests, benches :: All - libs = checkComponentWarnings libBuildInfo $ - maybeToList library ++ subLibraries - - exes = checkComponentWarnings buildInfo $ executables - tests = checkComponentWarnings testBuildInfo $ testSuites - benches = checkComponentWarnings benchmarkBuildInfo $ benchmarks + pkgLibs = maybeToList library ++ subLibraries - safeToFilterWarnings :: Bool - safeToFilterWarnings = getAll $ mconcat - [checkWarnings ghcArgs, libs, exes, tests, benches] + checkComponentFlags :: (a -> BuildInfo) -> [a] -> m + checkComponentFlags getInfo = foldMap (checkComponent . getInfo) + where + checkComponent :: BuildInfo -> m + checkComponent = foldMap fun . filterGhcOptions . allGhcOptions - checkWarnings :: [String] -> All - checkWarnings = All . Set.null . foldr alter Set.empty + allGhcOptions :: BuildInfo -> [(CompilerFlavor, [String])] + allGhcOptions = + mconcat [options, profOptions, sharedOptions, staticOptions] + + filterGhcOptions :: [(CompilerFlavor, [String])] -> [[String]] + filterGhcOptions l = [opts | (GHC, opts) <- l] + + safeToFilterWarnings :: Bool + safeToFilterWarnings = getAll $ checkGhcFlags checkWarnings where + checkWarnings :: [String] -> All + checkWarnings = All . Set.null . foldr alter Set.empty + alter :: String -> Set String -> Set String alter flag = appEndo $ mconcat [ \s -> Endo $ if s == "-Werror" then Set.insert s else id , \s -> Endo $ if s == "-Wwarn" then const Set.empty else id + , \s -> from [8,6] . Endo $ + if s == "-Werror=compat" + then Set.union compatWarningSet else id + , \s -> from [8,6] . Endo $ + if s == "-Wno-error=compat" + then (`Set.difference` compatWarningSet) else id + , \s -> from [8,6] . Endo $ + if s == "-Wwarn=compat" + then (`Set.difference` compatWarningSet) else id , from [8,4] $ markFlag "-Werror=" Set.insert , from [8,4] $ markFlag "-Wwarn=" Set.delete , from [8,4] $ markFlag "-Wno-error=" Set.delete @@ -105,7 +121,7 @@ -> String -> Endo (Set String) markFlag name update flag = Endo $ case stripPrefix name flag of - Just rest | not (null rest) -> update rest + Just rest | not (null rest) && rest /= "compat" -> update rest _ -> id flagArgumentFilter :: [String] -> [String] -> [String] @@ -128,7 +144,20 @@ Nothing -> arg : go args argumentFilters :: [String] -> [String] - argumentFilters = flagArgumentFilter ["-ghci-script", "-H"] + argumentFilters = flagArgumentFilter + ["-ghci-script", "-H", "-interactive-print"] + + filterRtsOpts :: [String] -> [String] + filterRtsOpts = go False + where + go :: Bool -> [String] -> [String] + go _ [] = [] + go _ ("+RTS":opts) = go True opts + go _ ("-RTS":opts) = go False opts + go isRTSopts (opt:opts) = addOpt $ go isRTSopts opts + where + addOpt | isRTSopts = id + | otherwise = (opt:) simpleFilters :: String -> Bool simpleFilters = not . getAny . mconcat @@ -138,13 +167,18 @@ , Any . isPrefixOf "-dno-suppress-" , flagIn $ invertibleFlagSet "-" ["ignore-dot-ghci"] , flagIn . invertibleFlagSet "-f" . mconcat $ - [ [ "reverse-errors", "warn-unused-binds" ] + [ [ "reverse-errors", "warn-unused-binds", "break-on-error" + , "break-on-exception", "print-bind-result" + , "print-bind-contents", "print-evld-with-show" + , "implicit-import-qualified", "error-spans" + ] , from [8,2] [ "diagnostics-show-caret", "local-ghci-history" , "show-warning-groups", "hide-source-paths" , "show-hole-constraints" ] , from [8,4] ["show-loaded-modules"] + , from [8,6] [ "ghci-leak-check", "no-it" ] ] , flagIn . invertibleFlagSet "-d" $ [ "ppr-case-as-let", "ppr-ticks" ] , isOptIntFlag @@ -152,6 +186,10 @@ , if safeToFilterWarnings then isWarning <> (Any . ("-w"==)) else mempty + , from [8,6] $ + if safeToFilterHoles + then isTypedHoleFlag + else mempty ] flagIn :: Set String -> String -> Any @@ -168,7 +206,7 @@ , "-dverbose-stg2stg", "-dcore-lint", "-dstg-lint", "-dcmm-lint" , "-dasm-lint", "-dannot-lint", "-dshow-passes", "-dfaststring-stats" , "-fno-max-relevant-binds", "-recomp", "-no-recomp", "-fforce-recomp" - , "-fno-force-recomp", "-interactive-print" + , "-fno-force-recomp" ] , from [8,2] @@ -177,8 +215,9 @@ , "-dppr-debug", "-dno-debug-output" ] - , from [8,4] - [ "-ddebug-output", "-fno-max-valid-substitutions" ] + , from [8,4] [ "-ddebug-output" ] + , from [8,4] $ to [8,6] [ "-fno-max-valid-substitutions" ] + , from [8,6] [ "-dhex-word-literals" ] ] isOptIntFlag :: String -> Any @@ -189,7 +228,7 @@ [ [ "-fmax-relevant-binds", "-ddpr-user-length", "-ddpr-cols" , "-dtrace-level", "-fghci-hist-size" ] , from [8,2] ["-fmax-uncovered-patterns", "-fmax-errors"] - , from [8,4] ["-fmax-valid-substitutions"] + , from [8,4] $ to [8,6] ["-fmax-valid-substitutions"] ] dropIntFlag :: Bool -> String -> String -> Any @@ -216,6 +255,43 @@ invertibleFlagSet prefix flagNames = Set.fromList $ (++) <$> [prefix, prefix ++ "no-"] <*> flagNames + compatWarningSet :: Set String + compatWarningSet = Set.fromList $ mconcat + [ from [8,6] + [ "missing-monadfail-instances", "semigroup" + , "noncanonical-monoid-instances", "implicit-kind-vars" ] + ] + + safeToFilterHoles :: Bool + safeToFilterHoles = getAll . checkGhcFlags $ fromLast . foldMap notDeferred + where + fromLast :: Last All -> All + fromLast = fromMaybe (All True) . getLast + + notDeferred :: String -> Last All + notDeferred "-fdefer-typed-holes" = Last . Just . All $ False + notDeferred "-fno-defer-typed-holes" = Last . Just . All $ True + notDeferred _ = Last Nothing + + isTypedHoleFlag :: String -> Any + isTypedHoleFlag = mconcat + [ flagIn . invertibleFlagSet "-f" $ + [ "show-hole-constraints", "show-valid-substitutions" + , "show-valid-hole-fits", "sort-valid-hole-fits" + , "sort-by-size-hole-fits", "sort-by-subsumption-hole-fits" + , "abstract-refinement-hole-fits", "show-provenance-of-hole-fits" + , "show-hole-matches-of-hole-fits", "show-type-of-hole-fits" + , "show-type-app-of-hole-fits", "show-type-app-vars-of-hole-fits" + , "unclutter-valid-hole-fits" + ] + , flagIn . Set.fromList $ + [ "-fno-max-valid-hole-fits", "-fno-max-refinement-hole-fits" + , "-fno-refinement-level-hole-fits" ] + , mconcat . map (dropIntFlag False) $ + [ "-fmax-valid-hole-fits", "-fmax-refinement-hole-fits" + , "-frefinement-level-hole-fits" ] + ] + normaliseGhcArgs _ _ args = args -- | A structured set of GHC options/flags diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Program.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Program.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Program.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Program.hs 2018-11-27 22:49:57.000000000 +0000 @@ -198,41 +198,41 @@ -- Deprecated aliases -- -{-# DEPRECATED rawSystemProgram "use runProgram instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED rawSystemProgram "use runProgram instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} rawSystemProgram :: Verbosity -> ConfiguredProgram -> [ProgArg] -> IO () rawSystemProgram = runProgram -{-# DEPRECATED rawSystemProgramStdout "use getProgramOutput instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED rawSystemProgramStdout "use getProgramOutput instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} rawSystemProgramStdout :: Verbosity -> ConfiguredProgram -> [ProgArg] -> IO String rawSystemProgramStdout = getProgramOutput -{-# DEPRECATED rawSystemProgramConf "use runDbProgram instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED rawSystemProgramConf "use runDbProgram instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} rawSystemProgramConf :: Verbosity -> Program -> ProgramConfiguration -> [ProgArg] -> IO () rawSystemProgramConf = runDbProgram -{-# DEPRECATED rawSystemProgramStdoutConf "use getDbProgramOutput instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED rawSystemProgramStdoutConf "use getDbProgramOutput instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} rawSystemProgramStdoutConf :: Verbosity -> Program -> ProgramConfiguration -> [ProgArg] -> IO String rawSystemProgramStdoutConf = getDbProgramOutput -{-# DEPRECATED ProgramConfiguration "use ProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED ProgramConfiguration "use ProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} type ProgramConfiguration = ProgramDb -{-# DEPRECATED emptyProgramConfiguration "use emptyProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} -{-# DEPRECATED defaultProgramConfiguration "use defaultProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED emptyProgramConfiguration "use emptyProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} +{-# DEPRECATED defaultProgramConfiguration "use defaultProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} emptyProgramConfiguration, defaultProgramConfiguration :: ProgramConfiguration emptyProgramConfiguration = emptyProgramDb defaultProgramConfiguration = defaultProgramDb -{-# DEPRECATED restoreProgramConfiguration "use restoreProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED restoreProgramConfiguration "use restoreProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} restoreProgramConfiguration :: [Program] -> ProgramConfiguration -> ProgramConfiguration restoreProgramConfiguration = restoreProgramDb -{-# DEPRECATED findProgramOnPath "use findProgramOnSearchPath instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED findProgramOnPath "use findProgramOnSearchPath instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} findProgramOnPath :: String -> Verbosity -> IO (Maybe FilePath) findProgramOnPath name verbosity = fmap (fmap fst) $ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Setup.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Setup.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Simple/Setup.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Simple/Setup.hs 2018-11-27 22:49:57.000000000 +0000 @@ -57,7 +57,7 @@ defaultBenchmarkFlags, benchmarkCommand, CopyDest(..), configureArgs, configureOptions, configureCCompiler, configureLinker, - buildOptions, haddockOptions, installDirsOptions, + buildOptions, haddockOptions, installDirsOptions, testOptions', programDbOptions, programDbPaths', programConfigurationOptions, programConfigurationPaths', programFlagsDescription, @@ -99,8 +99,10 @@ import Distribution.Utils.NubList import Distribution.Types.Dependency import Distribution.Types.ComponentId +import Distribution.Types.GivenComponent import Distribution.Types.Module import Distribution.Types.PackageName +import Distribution.Types.UnqualComponentName (unUnqualComponentName) import Distribution.Compat.Stack import Distribution.Compat.Semigroup (Last' (..)) @@ -257,7 +259,7 @@ configStripLibs :: Flag Bool, -- ^Enable library stripping configConstraints :: [Dependency], -- ^Additional constraints for -- dependencies. - configDependencies :: [(PackageName, ComponentId)], + configDependencies :: [GivenComponent], -- ^The packages depended on. configInstantiateWith :: [(ModuleName, Module)], -- ^ The requested Backpack instantiation. If empty, either this @@ -646,9 +648,13 @@ ,option "" ["dependency"] "A list of exact dependencies. E.g., --dependency=\"void=void-0.5.8-177d5cdf20962d0581fe2e4932a6c309\"" configDependencies (\v flags -> flags { configDependencies = v}) - (reqArg "NAME=CID" - (parsecToReadE (const "dependency expected") ((\x -> [x]) `fmap` parsecDependency)) - (map (\x -> prettyShow (fst x) ++ "=" ++ prettyShow (snd x)))) + (reqArg "NAME[:COMPONENT_NAME]=CID" + (parsecToReadE (const "dependency expected") ((\x -> [x]) `fmap` parsecGivenComponent)) + (map (\(GivenComponent pn cn cid) -> + prettyShow pn + ++ case cn of LMainLibName -> "" + LSubLibName n -> ":" ++ prettyShow n + ++ "=" ++ prettyShow cid))) ,option "" ["instantiate-with"] "A mapping of signature names to concrete module instantiations." @@ -730,12 +736,18 @@ showProfDetailLevelFlag NoFlag = [] showProfDetailLevelFlag (Flag dl) = [showProfDetailLevel dl] -parsecDependency :: ParsecParser (PackageName, ComponentId) -parsecDependency = do - x <- parsec +parsecGivenComponent :: ParsecParser GivenComponent +parsecGivenComponent = do + pn <- parsec + ln <- P.option LMainLibName $ do + _ <- P.char ':' + ucn <- parsec + return $ if unUnqualComponentName ucn == unPackageName pn + then LMainLibName + else LSubLibName ucn _ <- P.char '=' - y <- parsec - return (x, y) + cid <- parsec + return $ GivenComponent pn ln cid installDirsOptions :: [OptionField (InstallDirs (Flag PathTemplate))] installDirsOptions = @@ -1818,7 +1830,9 @@ -- ------------------------------------------------------------ data TestShowDetails = Never | Failures | Always | Streaming | Direct - deriving (Eq, Ord, Enum, Bounded, Show) + deriving (Eq, Ord, Enum, Bounded, Generic, Show) + +instance Binary TestShowDetails knownTestShowDetails :: [TestShowDetails] knownTestShowDetails = [minBound..maxBound] @@ -1886,60 +1900,63 @@ , "TESTCOMPONENTS [FLAGS]" ] , commandDefaultFlags = defaultTestFlags - , commandOptions = \showOrParseArgs -> - [ optionVerbosity testVerbosity (\v flags -> flags { testVerbosity = v }) - , optionDistPref - testDistPref (\d flags -> flags { testDistPref = d }) - showOrParseArgs - , option [] ["log"] - ("Log all test suite results to file (name template can use " - ++ "$pkgid, $compiler, $os, $arch, $test-suite, $result)") - testHumanLog (\v flags -> flags { testHumanLog = v }) - (reqArg' "TEMPLATE" - (toFlag . toPathTemplate) - (flagToList . fmap fromPathTemplate)) - , option [] ["machine-log"] - ("Produce a machine-readable log file (name template can use " - ++ "$pkgid, $compiler, $os, $arch, $result)") - testMachineLog (\v flags -> flags { testMachineLog = v }) - (reqArg' "TEMPLATE" - (toFlag . toPathTemplate) - (flagToList . fmap fromPathTemplate)) - , option [] ["show-details"] - ("'always': always show results of individual test cases. " - ++ "'never': never show results of individual test cases. " - ++ "'failures': show results of failing test cases. " - ++ "'streaming': show results of test cases in real time." - ++ "'direct': send results of test cases in real time; no log file.") - testShowDetails (\v flags -> flags { testShowDetails = v }) - (reqArg "FILTER" - (parsecToReadE (\_ -> "--show-details flag expects one of " - ++ intercalate ", " - (map prettyShow knownTestShowDetails)) - (fmap toFlag parsec)) - (flagToList . fmap prettyShow)) - , option [] ["keep-tix-files"] - "keep .tix files for HPC between test runs" - testKeepTix (\v flags -> flags { testKeepTix = v}) - trueArg - , option [] ["test-options"] - ("give extra options to test executables " - ++ "(name templates can use $pkgid, $compiler, " - ++ "$os, $arch, $test-suite)") - testOptions (\v flags -> flags { testOptions = v }) - (reqArg' "TEMPLATES" (map toPathTemplate . splitArgs) - (const [])) - , option [] ["test-option"] - ("give extra option to test executables " - ++ "(no need to quote options containing spaces, " - ++ "name template can use $pkgid, $compiler, " - ++ "$os, $arch, $test-suite)") - testOptions (\v flags -> flags { testOptions = v }) - (reqArg' "TEMPLATE" (\x -> [toPathTemplate x]) - (map fromPathTemplate)) - ] + , commandOptions = testOptions' } +testOptions' :: ShowOrParseArgs -> [OptionField TestFlags] +testOptions' showOrParseArgs = + [ optionVerbosity testVerbosity (\v flags -> flags { testVerbosity = v }) + , optionDistPref + testDistPref (\d flags -> flags { testDistPref = d }) + showOrParseArgs + , option [] ["log"] + ("Log all test suite results to file (name template can use " + ++ "$pkgid, $compiler, $os, $arch, $test-suite, $result)") + testHumanLog (\v flags -> flags { testHumanLog = v }) + (reqArg' "TEMPLATE" + (toFlag . toPathTemplate) + (flagToList . fmap fromPathTemplate)) + , option [] ["machine-log"] + ("Produce a machine-readable log file (name template can use " + ++ "$pkgid, $compiler, $os, $arch, $result)") + testMachineLog (\v flags -> flags { testMachineLog = v }) + (reqArg' "TEMPLATE" + (toFlag . toPathTemplate) + (flagToList . fmap fromPathTemplate)) + , option [] ["show-details"] + ("'always': always show results of individual test cases. " + ++ "'never': never show results of individual test cases. " + ++ "'failures': show results of failing test cases. " + ++ "'streaming': show results of test cases in real time." + ++ "'direct': send results of test cases in real time; no log file.") + testShowDetails (\v flags -> flags { testShowDetails = v }) + (reqArg "FILTER" + (parsecToReadE (\_ -> "--show-details flag expects one of " + ++ intercalate ", " + (map prettyShow knownTestShowDetails)) + (fmap toFlag parsec)) + (flagToList . fmap prettyShow)) + , option [] ["keep-tix-files"] + "keep .tix files for HPC between test runs" + testKeepTix (\v flags -> flags { testKeepTix = v}) + trueArg + , option [] ["test-options"] + ("give extra options to test executables " + ++ "(name templates can use $pkgid, $compiler, " + ++ "$os, $arch, $test-suite)") + testOptions (\v flags -> flags { testOptions = v }) + (reqArg' "TEMPLATES" (map toPathTemplate . splitArgs) + (const [])) + , option [] ["test-option"] + ("give extra option to test executables " + ++ "(no need to quote options containing spaces, " + ++ "name template can use $pkgid, $compiler, " + ++ "$os, $arch, $test-suite)") + testOptions (\v flags -> flags { testOptions = v }) + (reqArg' "TEMPLATE" (\x -> [toPathTemplate x]) + (map fromPathTemplate)) + ] + emptyTestFlags :: TestFlags emptyTestFlags = mempty diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseExceptionId.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseExceptionId.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseExceptionId.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseExceptionId.hs 2018-11-27 22:49:57.000000000 +0000 @@ -46,16 +46,17 @@ | I2p_gpl_java_exception -- ^ @i2p-gpl-java-exception@, i2p GPL+Java Exception | Libtool_exception -- ^ @Libtool-exception@, Libtool Exception | Linux_syscall_note -- ^ @Linux-syscall-note@, Linux Syscall Note - | LLVM_exception -- ^ @LLVM-exception@, LLVM Exception, SPDX License List 3.2 + | LLVM_exception -- ^ @LLVM-exception@, LLVM Exception, SPDX License List 3.2, SPDX License List 3.3 | LZMA_exception -- ^ @LZMA-exception@, LZMA exception | Mif_exception -- ^ @mif-exception@, Macros and Inline Functions Exception | Nokia_Qt_exception_1_1 -- ^ @Nokia-Qt-exception-1.1@, Nokia Qt LGPL exception 1.1 + | OCaml_LGPL_linking_exception -- ^ @OCaml-LGPL-linking-exception@, OCaml LGPL Linking Exception, SPDX License List 3.3 | OCCT_exception_1_0 -- ^ @OCCT-exception-1.0@, Open CASCADE Exception 1.0 - | OpenJDK_assembly_exception_1_0 -- ^ @OpenJDK-assembly-exception-1.0@, OpenJDK Assembly exception 1.0, SPDX License List 3.2 + | OpenJDK_assembly_exception_1_0 -- ^ @OpenJDK-assembly-exception-1.0@, OpenJDK Assembly exception 1.0, SPDX License List 3.2, SPDX License List 3.3 | Openvpn_openssl_exception -- ^ @openvpn-openssl-exception@, OpenVPN OpenSSL Exception - | PS_or_PDF_font_exception_20170817 -- ^ @PS-or-PDF-font-exception-20170817@, PS/PDF font exception (2017-08-17), SPDX License List 3.2 - | Qt_GPL_exception_1_0 -- ^ @Qt-GPL-exception-1.0@, Qt GPL exception 1.0, SPDX License List 3.2 - | Qt_LGPL_exception_1_1 -- ^ @Qt-LGPL-exception-1.1@, Qt LGPL exception 1.1, SPDX License List 3.2 + | PS_or_PDF_font_exception_20170817 -- ^ @PS-or-PDF-font-exception-20170817@, PS/PDF font exception (2017-08-17), SPDX License List 3.2, SPDX License List 3.3 + | Qt_GPL_exception_1_0 -- ^ @Qt-GPL-exception-1.0@, Qt GPL exception 1.0, SPDX License List 3.2, SPDX License List 3.3 + | Qt_LGPL_exception_1_1 -- ^ @Qt-LGPL-exception-1.1@, Qt LGPL exception 1.1, SPDX License List 3.2, SPDX License List 3.3 | Qwt_exception_1_0 -- ^ @Qwt-exception-1.0@, Qwt exception 1.0 | U_boot_exception_2_0 -- ^ @u-boot-exception-2.0@, U-Boot exception 2.0 | WxWindows_exception_3_1 -- ^ @WxWindows-exception-3.1@, WxWindows Library Exception 3.1 @@ -105,6 +106,7 @@ licenseExceptionId LZMA_exception = "LZMA-exception" licenseExceptionId Mif_exception = "mif-exception" licenseExceptionId Nokia_Qt_exception_1_1 = "Nokia-Qt-exception-1.1" +licenseExceptionId OCaml_LGPL_linking_exception = "OCaml-LGPL-linking-exception" licenseExceptionId OCCT_exception_1_0 = "OCCT-exception-1.0" licenseExceptionId OpenJDK_assembly_exception_1_0 = "OpenJDK-assembly-exception-1.0" licenseExceptionId Openvpn_openssl_exception = "openvpn-openssl-exception" @@ -140,6 +142,7 @@ licenseExceptionName LZMA_exception = "LZMA exception" licenseExceptionName Mif_exception = "Macros and Inline Functions Exception" licenseExceptionName Nokia_Qt_exception_1_1 = "Nokia Qt LGPL exception 1.1" +licenseExceptionName OCaml_LGPL_linking_exception = "OCaml LGPL Linking Exception" licenseExceptionName OCCT_exception_1_0 = "Open CASCADE Exception 1.0" licenseExceptionName OpenJDK_assembly_exception_1_0 = "OpenJDK Assembly exception 1.0" licenseExceptionName Openvpn_openssl_exception = "OpenVPN OpenSSL Exception" @@ -166,11 +169,21 @@ , Qt_LGPL_exception_1_1 ] ++ bulkOfLicenses +licenseExceptionIdList LicenseListVersion_3_3 = + [ LLVM_exception + , OCaml_LGPL_linking_exception + , OpenJDK_assembly_exception_1_0 + , PS_or_PDF_font_exception_20170817 + , Qt_GPL_exception_1_0 + , Qt_LGPL_exception_1_1 + ] + ++ bulkOfLicenses -- | Create a 'LicenseExceptionId' from a 'String'. mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId mkLicenseExceptionId LicenseListVersion_3_0 s = Map.lookup s stringLookup_3_0 mkLicenseExceptionId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2 +mkLicenseExceptionId LicenseListVersion_3_3 s = Map.lookup s stringLookup_3_3 stringLookup_3_0 :: Map String LicenseExceptionId stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $ @@ -178,7 +191,11 @@ stringLookup_3_2 :: Map String LicenseExceptionId stringLookup_3_2 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $ - licenseExceptionIdList LicenseListVersion_3_2 + licenseExceptionIdList LicenseListVersion_3_3 + +stringLookup_3_3 :: Map String LicenseExceptionId +stringLookup_3_3 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $ + licenseExceptionIdList LicenseListVersion_3_3 -- | License exceptions in all SPDX License lists bulkOfLicenses :: [LicenseExceptionId] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseId.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseId.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseId.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseId.hs 2018-11-27 22:49:57.000000000 +0000 @@ -43,8 +43,8 @@ | AFL_3_0 -- ^ @AFL-3.0@, Academic Free License v3.0 | Afmparse -- ^ @Afmparse@, Afmparse License | AGPL_1_0 -- ^ @AGPL-1.0@, Affero General Public License v1.0, SPDX License List 3.0 - | AGPL_1_0_only -- ^ @AGPL-1.0-only@, Affero General Public License v1.0 only, SPDX License List 3.2 - | AGPL_1_0_or_later -- ^ @AGPL-1.0-or-later@, Affero General Public License v1.0 or later, SPDX License List 3.2 + | AGPL_1_0_only -- ^ @AGPL-1.0-only@, Affero General Public License v1.0 only, SPDX License List 3.2, SPDX License List 3.3 + | AGPL_1_0_or_later -- ^ @AGPL-1.0-or-later@, Affero General Public License v1.0 or later, SPDX License List 3.2, SPDX License List 3.3 | AGPL_3_0_only -- ^ @AGPL-3.0-only@, GNU Affero General Public License v3.0 only | AGPL_3_0_or_later -- ^ @AGPL-3.0-or-later@, GNU Affero General Public License v3.0 or later | Aladdin -- ^ @Aladdin@, Aladdin Free Public License @@ -138,6 +138,7 @@ | CNRI_Python_GPL_Compatible -- ^ @CNRI-Python-GPL-Compatible@, CNRI Python Open Source GPL Compatible License Agreement | CNRI_Python -- ^ @CNRI-Python@, CNRI Python License | Condor_1_1 -- ^ @Condor-1.1@, Condor Public License v1.1 + | Copyleft_next_0_3_1 -- ^ @copyleft-next-0.3.1@, copyleft-next 0.3.1, SPDX License List 3.3 | CPAL_1_0 -- ^ @CPAL-1.0@, Common Public Attribution License 1.0 | CPL_1_0 -- ^ @CPL-1.0@, Common Public License 1.0 | CPOL_1_02 -- ^ @CPOL-1.02@, Code Project Open License 1.02 @@ -170,8 +171,8 @@ | Frameworx_1_0 -- ^ @Frameworx-1.0@, Frameworx Open License 1.0 | FreeImage -- ^ @FreeImage@, FreeImage Public License v1.0 | FSFAP -- ^ @FSFAP@, FSF All Permissive License - | FSFUL -- ^ @FSFUL@, FSF Unlimited License | FSFULLR -- ^ @FSFULLR@, FSF Unlimited License (with License Retention) + | FSFUL -- ^ @FSFUL@, FSF Unlimited License | FTL -- ^ @FTL@, Freetype Project License | GFDL_1_1_only -- ^ @GFDL-1.1-only@, GNU Free Documentation License v1.1 only | GFDL_1_1_or_later -- ^ @GFDL-1.1-or-later@, GNU Free Documentation License v1.1 or later @@ -224,9 +225,9 @@ | LiLiQ_P_1_1 -- ^ @LiLiQ-P-1.1@, Licence Libre du Québec – Permissive version 1.1 | LiLiQ_R_1_1 -- ^ @LiLiQ-R-1.1@, Licence Libre du Québec – Réciprocité version 1.1 | LiLiQ_Rplus_1_1 -- ^ @LiLiQ-Rplus-1.1@, Licence Libre du Québec – Réciprocité forte version 1.1 - | Linux_OpenIB -- ^ @Linux-OpenIB@, Linux Kernel Variant of OpenIB.org license, SPDX License List 3.2 - | LPL_1_0 -- ^ @LPL-1.0@, Lucent Public License Version 1.0 + | Linux_OpenIB -- ^ @Linux-OpenIB@, Linux Kernel Variant of OpenIB.org license, SPDX License List 3.2, SPDX License List 3.3 | LPL_1_02 -- ^ @LPL-1.02@, Lucent Public License v1.02 + | LPL_1_0 -- ^ @LPL-1.0@, Lucent Public License Version 1.0 | LPPL_1_0 -- ^ @LPPL-1.0@, LaTeX Project Public License v1.0 | LPPL_1_1 -- ^ @LPPL-1.1@, LaTeX Project Public License v1.1 | LPPL_1_2 -- ^ @LPPL-1.2@, LaTeX Project Public License v1.2 @@ -234,13 +235,13 @@ | LPPL_1_3c -- ^ @LPPL-1.3c@, LaTeX Project Public License v1.3c | MakeIndex -- ^ @MakeIndex@, MakeIndex License | MirOS -- ^ @MirOS@, MirOS License - | MIT_0 -- ^ @MIT-0@, MIT No Attribution, SPDX License List 3.2 + | MIT_0 -- ^ @MIT-0@, MIT No Attribution, SPDX License List 3.2, SPDX License List 3.3 | MIT_advertising -- ^ @MIT-advertising@, Enlightenment License (e16) | MIT_CMU -- ^ @MIT-CMU@, CMU License | MIT_enna -- ^ @MIT-enna@, enna License | MIT_feh -- ^ @MIT-feh@, feh License - | MIT -- ^ @MIT@, MIT License | MITNFA -- ^ @MITNFA@, MIT +no-false-attribs license + | MIT -- ^ @MIT@, MIT License | Motosoto -- ^ @Motosoto@, Motosoto License | Mpich2 -- ^ @mpich2@, mpich2 License | MPL_1_0 -- ^ @MPL-1.0@, Mozilla Public License 1.0 @@ -273,9 +274,12 @@ | OCCT_PL -- ^ @OCCT-PL@, Open CASCADE Technology Public License | OCLC_2_0 -- ^ @OCLC-2.0@, OCLC Research Public License 2.0 | ODbL_1_0 -- ^ @ODbL-1.0@, ODC Open Database License v1.0 - | ODC_By_1_0 -- ^ @ODC-By-1.0@, Open Data Commons Attribution License v1.0, SPDX License List 3.2 + | ODC_By_1_0 -- ^ @ODC-By-1.0@, Open Data Commons Attribution License v1.0, SPDX License List 3.2, SPDX License List 3.3 | OFL_1_0 -- ^ @OFL-1.0@, SIL Open Font License 1.0 | OFL_1_1 -- ^ @OFL-1.1@, SIL Open Font License 1.1 + | OGL_UK_1_0 -- ^ @OGL-UK-1.0@, Open Government Licence v1.0, SPDX License List 3.3 + | OGL_UK_2_0 -- ^ @OGL-UK-2.0@, Open Government Licence v2.0, SPDX License List 3.3 + | OGL_UK_3_0 -- ^ @OGL-UK-3.0@, Open Government Licence v3.0, SPDX License List 3.3 | OGTSL -- ^ @OGTSL@, Open Group Test Suite License | OLDAP_1_1 -- ^ @OLDAP-1.1@, Open LDAP Public License v1.1 | OLDAP_1_2 -- ^ @OLDAP-1.2@, Open LDAP Public License v1.2 @@ -303,8 +307,8 @@ | OSL_2_1 -- ^ @OSL-2.1@, Open Software License 2.1 | OSL_3_0 -- ^ @OSL-3.0@, Open Software License 3.0 | PDDL_1_0 -- ^ @PDDL-1.0@, ODC Public Domain Dedication & License 1.0 - | PHP_3_0 -- ^ @PHP-3.0@, PHP License v3.0 | PHP_3_01 -- ^ @PHP-3.01@, PHP License v3.01 + | PHP_3_0 -- ^ @PHP-3.0@, PHP License v3.0 | Plexus -- ^ @Plexus@, Plexus Classworlds License | PostgreSQL -- ^ @PostgreSQL@, PostgreSQL License | Psfrag -- ^ @psfrag@, psfrag License @@ -323,6 +327,7 @@ | SAX_PD -- ^ @SAX-PD@, Sax Public Domain Notice | Saxpath -- ^ @Saxpath@, Saxpath License | SCEA -- ^ @SCEA@, SCEA Shared Source License + | Sendmail_8_23 -- ^ @Sendmail-8.23@, Sendmail License 8.23, SPDX License List 3.3 | Sendmail -- ^ @Sendmail@, Sendmail License | SGI_B_1_0 -- ^ @SGI-B-1.0@, SGI Free Software License B v1.0 | SGI_B_1_1 -- ^ @SGI-B-1.1@, SGI Free Software License B v1.1 @@ -345,8 +350,8 @@ | TMate -- ^ @TMate@, TMate Open Source License | TORQUE_1_1 -- ^ @TORQUE-1.1@, TORQUE v2.5+ Software License v1.1 | TOSL -- ^ @TOSL@, Trusster Open Source License - | TU_Berlin_1_0 -- ^ @TU-Berlin-1.0@, Technische Universitaet Berlin License 1.0, SPDX License List 3.2 - | TU_Berlin_2_0 -- ^ @TU-Berlin-2.0@, Technische Universitaet Berlin License 2.0, SPDX License List 3.2 + | TU_Berlin_1_0 -- ^ @TU-Berlin-1.0@, Technische Universitaet Berlin License 1.0, SPDX License List 3.2, SPDX License List 3.3 + | TU_Berlin_2_0 -- ^ @TU-Berlin-2.0@, Technische Universitaet Berlin License 2.0, SPDX License List 3.2, SPDX License List 3.3 | Unicode_DFS_2015 -- ^ @Unicode-DFS-2015@, Unicode License Agreement - Data Files and Software (2015) | Unicode_DFS_2016 -- ^ @Unicode-DFS-2016@, Unicode License Agreement - Data Files and Software (2016) | Unicode_TOU -- ^ @Unicode-TOU@, Unicode Terms of Use @@ -557,6 +562,7 @@ licenseId CNRI_Python_GPL_Compatible = "CNRI-Python-GPL-Compatible" licenseId CNRI_Python = "CNRI-Python" licenseId Condor_1_1 = "Condor-1.1" +licenseId Copyleft_next_0_3_1 = "copyleft-next-0.3.1" licenseId CPAL_1_0 = "CPAL-1.0" licenseId CPL_1_0 = "CPL-1.0" licenseId CPOL_1_02 = "CPOL-1.02" @@ -589,8 +595,8 @@ licenseId Frameworx_1_0 = "Frameworx-1.0" licenseId FreeImage = "FreeImage" licenseId FSFAP = "FSFAP" -licenseId FSFUL = "FSFUL" licenseId FSFULLR = "FSFULLR" +licenseId FSFUL = "FSFUL" licenseId FTL = "FTL" licenseId GFDL_1_1_only = "GFDL-1.1-only" licenseId GFDL_1_1_or_later = "GFDL-1.1-or-later" @@ -644,8 +650,8 @@ licenseId LiLiQ_R_1_1 = "LiLiQ-R-1.1" licenseId LiLiQ_Rplus_1_1 = "LiLiQ-Rplus-1.1" licenseId Linux_OpenIB = "Linux-OpenIB" -licenseId LPL_1_0 = "LPL-1.0" licenseId LPL_1_02 = "LPL-1.02" +licenseId LPL_1_0 = "LPL-1.0" licenseId LPPL_1_0 = "LPPL-1.0" licenseId LPPL_1_1 = "LPPL-1.1" licenseId LPPL_1_2 = "LPPL-1.2" @@ -658,8 +664,8 @@ licenseId MIT_CMU = "MIT-CMU" licenseId MIT_enna = "MIT-enna" licenseId MIT_feh = "MIT-feh" -licenseId MIT = "MIT" licenseId MITNFA = "MITNFA" +licenseId MIT = "MIT" licenseId Motosoto = "Motosoto" licenseId Mpich2 = "mpich2" licenseId MPL_1_0 = "MPL-1.0" @@ -695,6 +701,9 @@ licenseId ODC_By_1_0 = "ODC-By-1.0" licenseId OFL_1_0 = "OFL-1.0" licenseId OFL_1_1 = "OFL-1.1" +licenseId OGL_UK_1_0 = "OGL-UK-1.0" +licenseId OGL_UK_2_0 = "OGL-UK-2.0" +licenseId OGL_UK_3_0 = "OGL-UK-3.0" licenseId OGTSL = "OGTSL" licenseId OLDAP_1_1 = "OLDAP-1.1" licenseId OLDAP_1_2 = "OLDAP-1.2" @@ -722,8 +731,8 @@ licenseId OSL_2_1 = "OSL-2.1" licenseId OSL_3_0 = "OSL-3.0" licenseId PDDL_1_0 = "PDDL-1.0" -licenseId PHP_3_0 = "PHP-3.0" licenseId PHP_3_01 = "PHP-3.01" +licenseId PHP_3_0 = "PHP-3.0" licenseId Plexus = "Plexus" licenseId PostgreSQL = "PostgreSQL" licenseId Psfrag = "psfrag" @@ -742,6 +751,7 @@ licenseId SAX_PD = "SAX-PD" licenseId Saxpath = "Saxpath" licenseId SCEA = "SCEA" +licenseId Sendmail_8_23 = "Sendmail-8.23" licenseId Sendmail = "Sendmail" licenseId SGI_B_1_0 = "SGI-B-1.0" licenseId SGI_B_1_1 = "SGI-B-1.1" @@ -909,6 +919,7 @@ licenseName CNRI_Python_GPL_Compatible = "CNRI Python Open Source GPL Compatible License Agreement" licenseName CNRI_Python = "CNRI Python License" licenseName Condor_1_1 = "Condor Public License v1.1" +licenseName Copyleft_next_0_3_1 = "copyleft-next 0.3.1" licenseName CPAL_1_0 = "Common Public Attribution License 1.0" licenseName CPL_1_0 = "Common Public License 1.0" licenseName CPOL_1_02 = "Code Project Open License 1.02" @@ -941,8 +952,8 @@ licenseName Frameworx_1_0 = "Frameworx Open License 1.0" licenseName FreeImage = "FreeImage Public License v1.0" licenseName FSFAP = "FSF All Permissive License" -licenseName FSFUL = "FSF Unlimited License" licenseName FSFULLR = "FSF Unlimited License (with License Retention)" +licenseName FSFUL = "FSF Unlimited License" licenseName FTL = "Freetype Project License" licenseName GFDL_1_1_only = "GNU Free Documentation License v1.1 only" licenseName GFDL_1_1_or_later = "GNU Free Documentation License v1.1 or later" @@ -996,8 +1007,8 @@ licenseName LiLiQ_R_1_1 = "Licence Libre du Qu\233bec \8211 R\233ciprocit\233 version 1.1" licenseName LiLiQ_Rplus_1_1 = "Licence Libre du Qu\233bec \8211 R\233ciprocit\233 forte version 1.1" licenseName Linux_OpenIB = "Linux Kernel Variant of OpenIB.org license" -licenseName LPL_1_0 = "Lucent Public License Version 1.0" licenseName LPL_1_02 = "Lucent Public License v1.02" +licenseName LPL_1_0 = "Lucent Public License Version 1.0" licenseName LPPL_1_0 = "LaTeX Project Public License v1.0" licenseName LPPL_1_1 = "LaTeX Project Public License v1.1" licenseName LPPL_1_2 = "LaTeX Project Public License v1.2" @@ -1010,8 +1021,8 @@ licenseName MIT_CMU = "CMU License" licenseName MIT_enna = "enna License" licenseName MIT_feh = "feh License" -licenseName MIT = "MIT License" licenseName MITNFA = "MIT +no-false-attribs license" +licenseName MIT = "MIT License" licenseName Motosoto = "Motosoto License" licenseName Mpich2 = "mpich2 License" licenseName MPL_1_0 = "Mozilla Public License 1.0" @@ -1047,6 +1058,9 @@ licenseName ODC_By_1_0 = "Open Data Commons Attribution License v1.0" licenseName OFL_1_0 = "SIL Open Font License 1.0" licenseName OFL_1_1 = "SIL Open Font License 1.1" +licenseName OGL_UK_1_0 = "Open Government Licence v1.0" +licenseName OGL_UK_2_0 = "Open Government Licence v2.0" +licenseName OGL_UK_3_0 = "Open Government Licence v3.0" licenseName OGTSL = "Open Group Test Suite License" licenseName OLDAP_1_1 = "Open LDAP Public License v1.1" licenseName OLDAP_1_2 = "Open LDAP Public License v1.2" @@ -1074,8 +1088,8 @@ licenseName OSL_2_1 = "Open Software License 2.1" licenseName OSL_3_0 = "Open Software License 3.0" licenseName PDDL_1_0 = "ODC Public Domain Dedication & License 1.0" -licenseName PHP_3_0 = "PHP License v3.0" licenseName PHP_3_01 = "PHP License v3.01" +licenseName PHP_3_0 = "PHP License v3.0" licenseName Plexus = "Plexus Classworlds License" licenseName PostgreSQL = "PostgreSQL License" licenseName Psfrag = "psfrag License" @@ -1094,6 +1108,7 @@ licenseName SAX_PD = "Sax Public Domain Notice" licenseName Saxpath = "Saxpath License" licenseName SCEA = "SCEA Shared Source License" +licenseName Sendmail_8_23 = "Sendmail License 8.23" licenseName Sendmail = "Sendmail License" licenseName SGI_B_1_0 = "SGI Free Software License B v1.0" licenseName SGI_B_1_1 = "SGI Free Software License B v1.1" @@ -1263,6 +1278,7 @@ licenseIsOsiApproved CNRI_Python_GPL_Compatible = False licenseIsOsiApproved CNRI_Python = True licenseIsOsiApproved Condor_1_1 = False +licenseIsOsiApproved Copyleft_next_0_3_1 = False licenseIsOsiApproved CPAL_1_0 = True licenseIsOsiApproved CPL_1_0 = True licenseIsOsiApproved CPOL_1_02 = False @@ -1295,8 +1311,8 @@ licenseIsOsiApproved Frameworx_1_0 = True licenseIsOsiApproved FreeImage = False licenseIsOsiApproved FSFAP = False -licenseIsOsiApproved FSFUL = False licenseIsOsiApproved FSFULLR = False +licenseIsOsiApproved FSFUL = False licenseIsOsiApproved FTL = False licenseIsOsiApproved GFDL_1_1_only = False licenseIsOsiApproved GFDL_1_1_or_later = False @@ -1350,8 +1366,8 @@ licenseIsOsiApproved LiLiQ_R_1_1 = True licenseIsOsiApproved LiLiQ_Rplus_1_1 = True licenseIsOsiApproved Linux_OpenIB = False -licenseIsOsiApproved LPL_1_0 = True licenseIsOsiApproved LPL_1_02 = True +licenseIsOsiApproved LPL_1_0 = True licenseIsOsiApproved LPPL_1_0 = False licenseIsOsiApproved LPPL_1_1 = False licenseIsOsiApproved LPPL_1_2 = False @@ -1364,8 +1380,8 @@ licenseIsOsiApproved MIT_CMU = False licenseIsOsiApproved MIT_enna = False licenseIsOsiApproved MIT_feh = False -licenseIsOsiApproved MIT = True licenseIsOsiApproved MITNFA = False +licenseIsOsiApproved MIT = True licenseIsOsiApproved Motosoto = True licenseIsOsiApproved Mpich2 = False licenseIsOsiApproved MPL_1_0 = True @@ -1401,6 +1417,9 @@ licenseIsOsiApproved ODC_By_1_0 = False licenseIsOsiApproved OFL_1_0 = False licenseIsOsiApproved OFL_1_1 = True +licenseIsOsiApproved OGL_UK_1_0 = False +licenseIsOsiApproved OGL_UK_2_0 = False +licenseIsOsiApproved OGL_UK_3_0 = False licenseIsOsiApproved OGTSL = True licenseIsOsiApproved OLDAP_1_1 = False licenseIsOsiApproved OLDAP_1_2 = False @@ -1428,8 +1447,8 @@ licenseIsOsiApproved OSL_2_1 = True licenseIsOsiApproved OSL_3_0 = True licenseIsOsiApproved PDDL_1_0 = False -licenseIsOsiApproved PHP_3_0 = True licenseIsOsiApproved PHP_3_01 = False +licenseIsOsiApproved PHP_3_0 = True licenseIsOsiApproved Plexus = False licenseIsOsiApproved PostgreSQL = True licenseIsOsiApproved Psfrag = False @@ -1448,6 +1467,7 @@ licenseIsOsiApproved SAX_PD = False licenseIsOsiApproved Saxpath = False licenseIsOsiApproved SCEA = False +licenseIsOsiApproved Sendmail_8_23 = False licenseIsOsiApproved Sendmail = False licenseIsOsiApproved SGI_B_1_0 = False licenseIsOsiApproved SGI_B_1_1 = False @@ -1524,11 +1544,27 @@ , TU_Berlin_2_0 ] ++ bulkOfLicenses +licenseIdList LicenseListVersion_3_3 = + [ AGPL_1_0_only + , AGPL_1_0_or_later + , Copyleft_next_0_3_1 + , Linux_OpenIB + , MIT_0 + , ODC_By_1_0 + , OGL_UK_1_0 + , OGL_UK_2_0 + , OGL_UK_3_0 + , Sendmail_8_23 + , TU_Berlin_1_0 + , TU_Berlin_2_0 + ] + ++ bulkOfLicenses -- | Create a 'LicenseId' from a 'String'. mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId mkLicenseId LicenseListVersion_3_0 s = Map.lookup s stringLookup_3_0 mkLicenseId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2 +mkLicenseId LicenseListVersion_3_3 s = Map.lookup s stringLookup_3_3 stringLookup_3_0 :: Map String LicenseId stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $ @@ -1538,6 +1574,10 @@ stringLookup_3_2 = Map.fromList $ map (\i -> (licenseId i, i)) $ licenseIdList LicenseListVersion_3_2 +stringLookup_3_3 :: Map String LicenseId +stringLookup_3_3 = Map.fromList $ map (\i -> (licenseId i, i)) $ + licenseIdList LicenseListVersion_3_2 + -- | Licenses in all SPDX License lists bulkOfLicenses :: [LicenseId] bulkOfLicenses = @@ -1678,8 +1718,8 @@ , Frameworx_1_0 , FreeImage , FSFAP - , FSFUL , FSFULLR + , FSFUL , FTL , GFDL_1_1_only , GFDL_1_1_or_later @@ -1732,8 +1772,8 @@ , LiLiQ_P_1_1 , LiLiQ_R_1_1 , LiLiQ_Rplus_1_1 - , LPL_1_0 , LPL_1_02 + , LPL_1_0 , LPPL_1_0 , LPPL_1_1 , LPPL_1_2 @@ -1745,8 +1785,8 @@ , MIT_CMU , MIT_enna , MIT_feh - , MIT , MITNFA + , MIT , Motosoto , Mpich2 , MPL_1_0 @@ -1808,8 +1848,8 @@ , OSL_2_1 , OSL_3_0 , PDDL_1_0 - , PHP_3_0 , PHP_3_01 + , PHP_3_0 , Plexus , PostgreSQL , Psfrag diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseListVersion.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseListVersion.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseListVersion.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/SPDX/LicenseListVersion.hs 2018-11-27 22:49:57.000000000 +0000 @@ -9,8 +9,10 @@ data LicenseListVersion = LicenseListVersion_3_0 | LicenseListVersion_3_2 + | LicenseListVersion_3_3 deriving (Eq, Ord, Show, Enum, Bounded) cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion +cabalSpecVersionToSPDXListVersion CabalSpecV3_0 = LicenseListVersion_3_3 cabalSpecVersionToSPDXListVersion CabalSpecV2_4 = LicenseListVersion_3_2 cabalSpecVersionToSPDXListVersion _ = LicenseListVersion_3_0 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo/Lens.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo/Lens.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo/Lens.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo/Lens.hs 2018-11-27 22:49:58.000000000 +0000 @@ -144,6 +144,10 @@ extraLibFlavours = buildInfo . extraLibFlavours {-# INLINE extraLibFlavours #-} + extraDynLibFlavours :: Lens' a [String] + extraDynLibFlavours = buildInfo . extraDynLibFlavours + {-# INLINE extraDynLibFlavours #-} + extraLibDirs :: Lens' a [String] extraLibDirs = buildInfo . extraLibDirs {-# INLINE extraLibDirs #-} @@ -283,6 +287,9 @@ extraLibFlavours f s = fmap (\x -> s { T.extraLibFlavours = x }) (f (T.extraLibFlavours s)) {-# INLINE extraLibFlavours #-} + extraDynLibFlavours f s = fmap (\x -> s { T.extraDynLibFlavours = x}) (f (T.extraDynLibFlavours s)) + {-# INLINE extraDynLibFlavours #-} + extraLibDirs f s = fmap (\x -> s { T.extraLibDirs = x }) (f (T.extraLibDirs s)) {-# INLINE extraLibDirs #-} diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/BuildInfo.hs 2018-11-27 22:49:57.000000000 +0000 @@ -77,17 +77,20 @@ extraLibs :: [String], -- ^ what libraries to link with when compiling a program that uses your package extraGHCiLibs :: [String], -- ^ if present, overrides extraLibs when package is loaded with GHCi. - extraBundledLibs :: [String], -- ^ if present, adds libs to hs-lirbaries, which become part of the package. + extraBundledLibs :: [String], -- ^ if present, adds libs to hs-libraries, which become part of the package. -- Example: the Cffi library shipping with the rts, alognside the HSrts-1.0.a,.o,... -- Example 2: a library that is being built by a foreing tool (e.g. rust) -- and copied and registered together with this library. The -- logic on how this library is built will have to be encoded in a -- custom Setup for now. Oherwise cabal would need to lear how to - -- call arbitary lirbary builders. - extraLibFlavours :: [String], -- ^ Hidden Flag. This set of strings, will be appended to all lirbaries when + -- call arbitary library builders. + extraLibFlavours :: [String], -- ^ Hidden Flag. This set of strings, will be appended to all libraries when -- copying. E.g. [libHS_ | flavour <- extraLibFlavours]. This -- should only be needed in very specific cases, e.g. the `rts` package, where -- there are multiple copies of slightly differently built libs. + extraDynLibFlavours :: [String], -- ^ Hidden Flag. This set of strings will be be appended to all /dynamic/ + -- libraries when copying. This is particularly useful with the `rts` package, + -- where we want different dynamic flavours of the RTS library to be installed. extraLibDirs :: [String], includeDirs :: [FilePath], -- ^directories to find .h files includes :: [FilePath], -- ^ The .h files to be found in includeDirs @@ -140,6 +143,7 @@ extraGHCiLibs = [], extraBundledLibs = [], extraLibFlavours = [], + extraDynLibFlavours = [], extraLibDirs = [], includeDirs = [], includes = [], @@ -186,6 +190,7 @@ extraGHCiLibs = combine extraGHCiLibs, extraBundledLibs = combine extraBundledLibs, extraLibFlavours = combine extraLibFlavours, + extraDynLibFlavours = combine extraDynLibFlavours, extraLibDirs = combineNub extraLibDirs, includeDirs = combineNub includeDirs, includes = combineNub includes, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/BuildType.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/BuildType.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/BuildType.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/BuildType.hs 2018-11-27 22:49:57.000000000 +0000 @@ -48,7 +48,7 @@ "Make" -> return Make "Default" -> do v <- askCabalSpecVersion - if v <= CabalSpecOld + if v <= CabalSpecV1_18 -- oldest version needing this, based on hackage-tests then do parsecWarning PWTBuildTypeDefault "build-type: Default is parsed as Custom for legacy reasons. See https://github.com/haskell/cabal/issues/5020" return Custom diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/ComponentName.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/ComponentName.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/ComponentName.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/ComponentName.hs 2018-11-27 22:49:57.000000000 +0000 @@ -3,7 +3,6 @@ module Distribution.Types.ComponentName ( ComponentName(..), - defaultLibName, libraryComponentName, showComponentName, componentNameStanza, @@ -16,14 +15,14 @@ import qualified Distribution.Compat.ReadP as Parse import Distribution.Compat.ReadP ((<++)) import Distribution.Types.UnqualComponentName +import Distribution.Types.LibraryName import Distribution.Pretty import Distribution.Text import Text.PrettyPrint as Disp -- Libraries live in a separate namespace, so must distinguish -data ComponentName = CLibName - | CSubLibName UnqualComponentName +data ComponentName = CLibName LibraryName | CFLibName UnqualComponentName | CExeName UnqualComponentName | CTestName UnqualComponentName @@ -34,39 +33,32 @@ -- Build-target-ish syntax instance Pretty ComponentName where - pretty CLibName = Disp.text "lib" - pretty (CSubLibName str) = Disp.text "lib:" <<>> pretty str + pretty (CLibName lib) = pretty lib pretty (CFLibName str) = Disp.text "flib:" <<>> pretty str pretty (CExeName str) = Disp.text "exe:" <<>> pretty str pretty (CTestName str) = Disp.text "test:" <<>> pretty str pretty (CBenchName str) = Disp.text "bench:" <<>> pretty str instance Text ComponentName where - parse = parseComposite <++ parseSingle + parse = parseComposite <++ parseLib where - parseSingle = Parse.string "lib" >> return CLibName + parseLib = CLibName <$> parse parseComposite = do - ctor <- Parse.choice [ Parse.string "lib:" >> return CSubLibName - , Parse.string "flib:" >> return CFLibName + ctor <- Parse.choice [ Parse.string "flib:" >> return CFLibName , Parse.string "exe:" >> return CExeName , Parse.string "bench:" >> return CBenchName , Parse.string "test:" >> return CTestName ] ctor <$> parse -defaultLibName :: ComponentName -defaultLibName = CLibName - showComponentName :: ComponentName -> String -showComponentName CLibName = "library" -showComponentName (CSubLibName name) = "library '" ++ display name ++ "'" +showComponentName (CLibName lib) = showLibraryName lib showComponentName (CFLibName name) = "foreign library '" ++ display name ++ "'" showComponentName (CExeName name) = "executable '" ++ display name ++ "'" showComponentName (CTestName name) = "test suite '" ++ display name ++ "'" showComponentName (CBenchName name) = "benchmark '" ++ display name ++ "'" componentNameStanza :: ComponentName -> String -componentNameStanza CLibName = "library" -componentNameStanza (CSubLibName name) = "library " ++ display name +componentNameStanza (CLibName lib) = libraryNameStanza lib componentNameStanza (CFLibName name) = "foreign-library " ++ display name componentNameStanza (CExeName name) = "executable " ++ display name componentNameStanza (CTestName name) = "test-suite " ++ display name @@ -77,8 +69,7 @@ -- @Nothing@ if the 'ComponentName' was for the public -- library. componentNameString :: ComponentName -> Maybe UnqualComponentName -componentNameString CLibName = Nothing -componentNameString (CSubLibName n) = Just n +componentNameString (CLibName lib) = libraryNameString lib componentNameString (CFLibName n) = Just n componentNameString (CExeName n) = Just n componentNameString (CTestName n) = Just n @@ -87,5 +78,5 @@ -- | Convert the 'UnqualComponentName' of a library into a -- 'ComponentName'. libraryComponentName :: Maybe UnqualComponentName -> ComponentName -libraryComponentName Nothing = CLibName -libraryComponentName (Just n) = CSubLibName n +libraryComponentName Nothing = CLibName LMainLibName +libraryComponentName (Just n) = CLibName $ LSubLibName n diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/Dependency.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/Dependency.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/Dependency.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/Dependency.hs 2018-11-27 22:49:57.000000000 +0000 @@ -4,6 +4,7 @@ ( Dependency(..) , depPkgName , depVerRange + , depLibraries , thisPackageVersion , notThisPackageVersion , simplifyDependency @@ -18,55 +19,120 @@ import qualified Distribution.Compat.ReadP as Parse +import Distribution.CabalSpecVersion import Distribution.Text import Distribution.Pretty +import qualified Text.PrettyPrint as PP import Distribution.Parsec.Class +import Distribution.Compat.CharParsing (char, spaces) +import Distribution.Compat.Parsing (between, option) import Distribution.Types.PackageId import Distribution.Types.PackageName +import Distribution.Types.LibraryName +import Distribution.Types.UnqualComponentName import Text.PrettyPrint ((<+>)) +import Data.Set (Set) +import qualified Data.Set as Set -- | Describes a dependency on a source package (API) -- -data Dependency = Dependency PackageName VersionRange +data Dependency = Dependency + PackageName + VersionRange + (Set LibraryName) + -- ^ The set of libraries required from the package. + -- Only the selected libraries will be built. + -- It does not affect the cabal-install solver yet. deriving (Generic, Read, Show, Eq, Typeable, Data) depPkgName :: Dependency -> PackageName -depPkgName (Dependency pn _) = pn +depPkgName (Dependency pn _ _) = pn depVerRange :: Dependency -> VersionRange -depVerRange (Dependency _ vr) = vr +depVerRange (Dependency _ vr _) = vr + +depLibraries :: Dependency -> Set LibraryName +depLibraries (Dependency _ _ cs) = cs instance Binary Dependency instance NFData Dependency where rnf = genericRnf instance Pretty Dependency where - pretty (Dependency name ver) = pretty name <+> pretty ver + pretty (Dependency name ver sublibs) = pretty name + <+> optionalMonoid + (sublibs /= Set.singleton LMainLibName) + (PP.colon <+> PP.braces prettySublibs) + <+> pretty ver + where + optionalMonoid True x = x + optionalMonoid False _ = mempty + prettySublibs = PP.hsep $ PP.punctuate PP.comma $ prettySublib <$> Set.toList sublibs + prettySublib LMainLibName = PP.text $ unPackageName name + prettySublib (LSubLibName un) = PP.text $ unUnqualComponentName un + +versionGuardMultilibs :: (Monad m, CabalParsing m) => m a -> m a +versionGuardMultilibs expr = do + csv <- askCabalSpecVersion + if csv < CabalSpecV3_0 + then fail $ unwords + [ "Sublibrary dependency syntax used." + , "To use this syntax the package needs to specify at least 'cabal-version: 3.0'." + , "Alternatively, if you are depending on an internal library, you can write" + , "directly the library name as it were a package." + ] + else + expr instance Parsec Dependency where parsec = do name <- lexemeParsec + + libs <- option [LMainLibName] + $ (char ':' *> spaces *>) + $ versionGuardMultilibs + $ pure <$> parseLib name <|> parseMultipleLibs name ver <- parsec <|> pure anyVersion - return (Dependency name ver) + return $ Dependency name ver $ Set.fromList libs + where makeLib pn ln | unPackageName pn == ln = LMainLibName + | otherwise = LSubLibName $ mkUnqualComponentName ln + parseLib pn = makeLib pn <$> parsecUnqualComponentName + parseMultipleLibs pn = between (char '{' *> spaces) + (spaces <* char '}') + $ parsecCommaList $ parseLib pn instance Text Dependency where parse = do name <- parse Parse.skipSpaces + libs <- option [LMainLibName] + $ (char ':' *>) + $ versionGuardMultilibs + $ pure <$> parseLib name <|> parseMultipleLibs name + Parse.skipSpaces ver <- parse Parse.<++ return anyVersion Parse.skipSpaces - return (Dependency name ver) - + return $ Dependency name ver $ Set.fromList libs + where makeLib pn ln | unPackageName pn == ln = LMainLibName + | otherwise = LSubLibName $ mkUnqualComponentName ln + parseLib pn = makeLib pn <$> parsecUnqualComponentName + parseMultipleLibs pn = between (char '{' *> spaces) + (spaces <* char '}') + $ parsecCommaList $ parseLib pn + +-- mempty should never be in a Dependency-as-dependency. +-- This is only here until the Dependency-as-constraint problem is solved #5570. +-- Same for below. thisPackageVersion :: PackageIdentifier -> Dependency thisPackageVersion (PackageIdentifier n v) = - Dependency n (thisVersion v) + Dependency n (thisVersion v) Set.empty notThisPackageVersion :: PackageIdentifier -> Dependency notThisPackageVersion (PackageIdentifier n v) = - Dependency n (notThisVersion v) + Dependency n (notThisVersion v) Set.empty -- | Simplify the 'VersionRange' expression in a 'Dependency'. -- See 'simplifyVersionRange'. -- simplifyDependency :: Dependency -> Dependency -simplifyDependency (Dependency name range) = - Dependency name (simplifyVersionRange range) +simplifyDependency (Dependency name range comps) = + Dependency name (simplifyVersionRange range) comps diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/DependencyMap.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/DependencyMap.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/DependencyMap.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/DependencyMap.hs 2018-11-27 22:49:57.000000000 +0000 @@ -10,13 +10,15 @@ import Distribution.Types.Dependency import Distribution.Types.PackageName +import Distribution.Types.LibraryName import Distribution.Version +import Data.Set (Set) import qualified Data.Map.Lazy as Map -- | A map of dependencies. Newtyped since the default monoid instance is not -- appropriate. The monoid instance uses 'intersectVersionRanges'. -newtype DependencyMap = DependencyMap { unDependencyMap :: Map PackageName VersionRange } +newtype DependencyMap = DependencyMap { unDependencyMap :: Map PackageName (VersionRange, Set LibraryName) } deriving (Show, Read) instance Monoid DependencyMap where @@ -25,14 +27,20 @@ instance Semigroup DependencyMap where (DependencyMap a) <> (DependencyMap b) = - DependencyMap (Map.unionWith intersectVersionRanges a b) + DependencyMap (Map.unionWith intersectVersionRangesAndJoinComponents a b) + +intersectVersionRangesAndJoinComponents :: (VersionRange, Set LibraryName) + -> (VersionRange, Set LibraryName) + -> (VersionRange, Set LibraryName) +intersectVersionRangesAndJoinComponents (va, ca) (vb, cb) = + (intersectVersionRanges va vb, ca <> cb) toDepMap :: [Dependency] -> DependencyMap toDepMap ds = - DependencyMap $ Map.fromListWith intersectVersionRanges [ (p,vr) | Dependency p vr <- ds ] + DependencyMap $ Map.fromListWith intersectVersionRangesAndJoinComponents [ (p,(vr,cs)) | Dependency p vr cs <- ds ] fromDepMap :: DependencyMap -> [Dependency] -fromDepMap m = [ Dependency p vr | (p,vr) <- Map.toList (unDependencyMap m) ] +fromDepMap m = [ Dependency p vr cs | (p,(vr,cs)) <- Map.toList (unDependencyMap m) ] -- Apply extra constraints to a dependency map. -- Combines dependencies where the result will only contain keys from the left @@ -48,4 +56,4 @@ where tightenConstraint n c l = case Map.lookup n l of Nothing -> l - Just vr -> Map.insert n (intersectVersionRanges vr c) l + Just vrcs -> Map.insert n (intersectVersionRangesAndJoinComponents vrcs c) l diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/GenericPackageDescription.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/GenericPackageDescription.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/GenericPackageDescription.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/GenericPackageDescription.hs 2018-11-27 22:49:57.000000000 +0000 @@ -336,7 +336,7 @@ +++ (do _ <- Parse.char '-' f <- parse return (f, False)) --- {-# DEPRECATED parseFlagAssignment "Use parsecFlagAssignment. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +-- {-# DEPRECATED parseFlagAssignment "Use parsecFlagAssignment. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} -- ----------------------------------------------------------------------------- -- The 'CondVar' type diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/GivenComponent.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/GivenComponent.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/GivenComponent.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/GivenComponent.hs 2018-11-27 22:49:57.000000000 +0000 @@ -0,0 +1,28 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +module Distribution.Types.GivenComponent ( + GivenComponent(..) +) where + +import Distribution.Compat.Prelude + +import Distribution.Types.ComponentId +import Distribution.Types.LibraryName +import Distribution.Types.PackageName + +-- | A 'GivenComponent' represents a library depended on and explicitly +-- specified by the user/client with @--dependency@ +-- +-- It enables Cabal to know which 'ComponentId' to associate with a library +-- +-- @since 2.3.0.0 +data GivenComponent = + GivenComponent + { givenComponentPackage :: PackageName + , givenComponentName :: LibraryName -- --dependency is for libraries + -- only, not for any component + , givenComponentId :: ComponentId } + deriving (Generic, Read, Show, Eq, Typeable) + +instance Binary GivenComponent + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/InstalledPackageInfo/FieldGrammar.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/InstalledPackageInfo/FieldGrammar.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/InstalledPackageInfo/FieldGrammar.hs 2018-10-17 15:56:22.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/InstalledPackageInfo/FieldGrammar.hs 2018-11-27 22:49:57.000000000 +0000 @@ -10,6 +10,7 @@ import Prelude () import Distribution.Backpack +import Distribution.CabalSpecVersion import Distribution.Compat.Lens (Lens', (&), (.~)) import Distribution.Compat.Newtype import Distribution.FieldGrammar @@ -56,7 +57,8 @@ ipiFieldGrammar = mkInstalledPackageInfo -- Deprecated fields <$> monoidalFieldAla "hugs-options" (alaList' FSep Token) unitedList - ^^^ deprecatedField' "hugs isn't supported anymore" + --- https://github.com/haskell/cabal/commit/40f3601e17024f07e0da8e64d3dd390177ce908b + ^^^ deprecatedSince CabalSpecV1_22 "hugs isn't supported anymore" -- Very basic fields: name, version, package-name and lib-name <+> blurFieldGrammar basic basicFieldGrammar -- Basic fields diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/Library.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/Library.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/Library.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/Library.hs 2018-11-27 22:49:57.000000000 +0000 @@ -82,6 +82,6 @@ -- in the package description ('explicitLibModules'); unfortunately, the -- type signature for 'allLibModules' is incompatible since we need a -- 'ComponentLocalBuildInfo'. -{-# DEPRECATED libModules "If you want all modules that are built with a library, use 'allLibModules'. Otherwise, use 'explicitLibModules' for ONLY the modules explicitly mentioned in the package description. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED libModules "If you want all modules that are built with a library, use 'allLibModules'. Otherwise, use 'explicitLibModules' for ONLY the modules explicitly mentioned in the package description. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} libModules :: Library -> [ModuleName] libModules = explicitLibModules diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/LibraryName.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/LibraryName.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/LibraryName.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/LibraryName.hs 2018-11-27 22:49:57.000000000 +0000 @@ -0,0 +1,64 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} + +module Distribution.Types.LibraryName ( + LibraryName(..), + defaultLibName, + maybeToLibraryName, + showLibraryName, + libraryNameStanza, + libraryNameString, + ) where + +import Prelude () +import Distribution.Compat.Prelude + +import qualified Distribution.Compat.ReadP as Parse +import Distribution.Compat.ReadP ((<++)) +import Distribution.Types.UnqualComponentName +import Distribution.Pretty +import Distribution.Text + +import Text.PrettyPrint as Disp + +data LibraryName = LMainLibName + | LSubLibName UnqualComponentName + deriving (Eq, Generic, Ord, Read, Show, Typeable, Data) + +instance Binary LibraryName +instance NFData LibraryName where rnf = genericRnf + +-- Build-target-ish syntax +instance Pretty LibraryName where + pretty LMainLibName = Disp.text "lib" + pretty (LSubLibName str) = Disp.text "lib:" <<>> pretty str + +instance Text LibraryName where + parse = parseComposite <++ parseSingle + where + parseSingle = Parse.string "lib" >> return LMainLibName + parseComposite = do + ctor <- Parse.string "lib:" >> return LSubLibName + ctor <$> parse + +defaultLibName :: LibraryName +defaultLibName = LMainLibName + +showLibraryName :: LibraryName -> String +showLibraryName LMainLibName = "library" +showLibraryName (LSubLibName name) = "library '" ++ display name ++ "'" + +libraryNameStanza :: LibraryName -> String +libraryNameStanza LMainLibName = "library" +libraryNameStanza (LSubLibName name) = "library " ++ display name + +libraryNameString :: LibraryName -> Maybe UnqualComponentName +libraryNameString LMainLibName = Nothing +libraryNameString (LSubLibName n) = Just n + +-- | Convert the 'UnqualComponentName' of a library into a +-- 'LibraryName'. +maybeToLibraryName :: Maybe UnqualComponentName -> LibraryName +maybeToLibraryName Nothing = LMainLibName +maybeToLibraryName (Just n) = LSubLibName n + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/LocalBuildInfo.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/LocalBuildInfo.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/LocalBuildInfo.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/LocalBuildInfo.hs 2018-11-27 22:49:57.000000000 +0000 @@ -176,7 +176,7 @@ -- on the package ID. localComponentId :: LocalBuildInfo -> ComponentId localComponentId lbi = - case componentNameCLBIs lbi CLibName of + case componentNameCLBIs lbi (CLibName LMainLibName) of [LibComponentLocalBuildInfo { componentComponentId = cid }] -> cid _ -> mkComponentId (display (localPackage lbi)) @@ -191,7 +191,7 @@ -- the package ID. localUnitId :: LocalBuildInfo -> UnitId localUnitId lbi = - case componentNameCLBIs lbi CLibName of + case componentNameCLBIs lbi (CLibName LMainLibName) of [LibComponentLocalBuildInfo { componentUnitId = uid }] -> uid _ -> mkLegacyUnitId $ localPackage lbi @@ -201,7 +201,7 @@ -- on the package ID. localCompatPackageKey :: LocalBuildInfo -> String localCompatPackageKey lbi = - case componentNameCLBIs lbi CLibName of + case componentNameCLBIs lbi (CLibName LMainLibName) of [LibComponentLocalBuildInfo { componentCompatPackageKey = pk }] -> pk _ -> display (localPackage lbi) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/ModuleRenaming.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/ModuleRenaming.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/ModuleRenaming.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/ModuleRenaming.hs 2018-11-27 22:49:57.000000000 +0000 @@ -112,7 +112,7 @@ instance Text ModuleRenaming where - parse = do fmap ModuleRenaming parseRns + parse = fmap ModuleRenaming parseRns <++ parseHidingRenaming <++ return DefaultRenaming where parseRns = do diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription/Lens.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription/Lens.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription/Lens.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription/Lens.hs 2018-11-27 22:49:58.000000000 +0000 @@ -23,6 +23,7 @@ import Distribution.Types.ForeignLib.Lens (foreignLibName, foreignLibBuildInfo) import Distribution.Types.Library (Library, explicitLibModules) import Distribution.Types.Library.Lens (libName, libBuildInfo) +import Distribution.Types.LibraryName (LibraryName(..)) import Distribution.Types.PackageDescription (PackageDescription) import Distribution.Types.PackageId (PackageIdentifier) import Distribution.Types.SetupBuildInfo (SetupBuildInfo) @@ -158,8 +159,8 @@ -- | @since 2.4 componentModules :: Monoid r => ComponentName -> Getting r PackageDescription [ModuleName] componentModules cname = case cname of - CLibName -> library . traverse . getting explicitLibModules - CSubLibName name -> + CLibName LMainLibName -> library . traverse . getting explicitLibModules + CLibName (LSubLibName name) -> componentModules' name subLibraries (libName . non "") explicitLibModules CFLibName name -> componentModules' name foreignLibs foreignLibName foreignLibModules @@ -194,9 +195,9 @@ -- | @since 2.4 componentBuildInfo :: ComponentName -> Traversal' PackageDescription BuildInfo componentBuildInfo cname = case cname of - CLibName -> + CLibName LMainLibName -> library . traverse . libBuildInfo - CSubLibName name -> + CLibName (LSubLibName name) -> componentBuildInfo' name subLibraries (libName . non "") libBuildInfo CFLibName name -> componentBuildInfo' name foreignLibs foreignLibName foreignLibBuildInfo diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/PackageDescription.hs 2018-11-27 22:49:57.000000000 +0000 @@ -77,6 +77,7 @@ import Distribution.Types.Dependency import Distribution.Types.PackageId import Distribution.Types.ComponentName +import Distribution.Types.LibraryName import Distribution.Types.PackageName import Distribution.Types.UnqualComponentName import Distribution.Types.SetupBuildInfo @@ -200,7 +201,7 @@ descCabalVersion pkg = case specVersionRaw pkg of Left version -> orLaterVersion version Right versionRange -> versionRange -{-# DEPRECATED descCabalVersion "Use specVersion instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED descCabalVersion "Use specVersion instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} -- | The effective @build-type@ after applying defaulting rules. -- @@ -449,8 +450,8 @@ enabledComponents pkg enabled = filter (componentEnabled enabled) $ pkgBuildableComponents pkg lookupComponent :: PackageDescription -> ComponentName -> Maybe Component -lookupComponent pkg CLibName = fmap CLib (library pkg) -lookupComponent pkg (CSubLibName name) = +lookupComponent pkg (CLibName LMainLibName) = fmap CLib (library pkg) +lookupComponent pkg (CLibName (LSubLibName name)) = fmap CLib $ find ((Just name ==) . libName) (subLibraries pkg) lookupComponent pkg (CFLibName name) = fmap CFLib $ find ((name ==) . foreignLibName) (foreignLibs pkg) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/PackageVersionConstraint.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/PackageVersionConstraint.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/PackageVersionConstraint.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/PackageVersionConstraint.hs 2018-11-27 22:49:57.000000000 +0000 @@ -0,0 +1,39 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +module Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint(..) + ) where + +import Prelude () +import Distribution.Compat.Prelude + +import qualified Distribution.Compat.ReadP as Parse +import Distribution.Text +import Distribution.Pretty +import Text.PrettyPrint ((<+>)) + +import Distribution.Types.VersionRange +import Distribution.Types.PackageName + + +-- | A version constraint on a package. Different from 'ExeDependency' and +-- 'Dependency' since it does not specify the need for a component, not even +-- the main library. +-- There are a few places in the codebase where 'Dependency' is used where +-- 'PackageVersionConstraint' should be used instead (#5570). +data PackageVersionConstraint = PackageVersionConstraint PackageName VersionRange + deriving (Generic, Read, Show, Eq, Typeable, Data) + +instance Binary PackageVersionConstraint +instance NFData PackageVersionConstraint where rnf = genericRnf + +instance Pretty PackageVersionConstraint where + pretty (PackageVersionConstraint name ver) = pretty name <+> pretty ver + +instance Text PackageVersionConstraint where + parse = do name <- parse + Parse.skipSpaces + ver <- parse Parse.<++ return anyVersion + Parse.skipSpaces + return (PackageVersionConstraint name ver) + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/UnitId.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/UnitId.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/UnitId.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/UnitId.hs 2018-11-27 22:49:57.000000000 +0000 @@ -68,7 +68,7 @@ newtype UnitId = UnitId ShortText deriving (Generic, Read, Show, Eq, Ord, Typeable, Data, NFData) -{-# DEPRECATED InstalledPackageId "Use UnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} +{-# DEPRECATED InstalledPackageId "Use UnitId instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} type InstalledPackageId = UnitId instance Binary UnitId diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/Version.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/Version.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Distribution/Types/Version.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Distribution/Types/Version.hs 2018-11-27 22:49:57.000000000 +0000 @@ -252,4 +252,4 @@ showVersion :: Version -> String showVersion = prettyShow -{-# DEPRECATED showVersion "Use prettyShow. This function will be removed in Cabal-3.0 (estimated Oct 2018)" #-} +{-# DEPRECATED showVersion "Use prettyShow. This function will be removed in Cabal-3.0 (estimated Mar 2019)" #-} diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/conf.py cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/conf.py --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/conf.py 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/conf.py 2018-11-27 22:49:58.000000000 +0000 @@ -60,7 +60,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -html_title = "Cabal User's Guide" +html_title = "Cabal {} User's Guide".format(release) html_short_title = "Cabal %s User's Guide" % release html_logo = 'images/Cabal-dark.png' html_static_path = ['images'] @@ -218,4 +218,3 @@ # # Default python allows recursion depth of 1000 calls. sys.setrecursionlimit(10000) - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/developing-packages.rst cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/developing-packages.rst --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/developing-packages.rst 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/developing-packages.rst 2018-11-27 22:49:58.000000000 +0000 @@ -801,7 +801,7 @@ The version of the Cabal specification that this package description uses. The Cabal specification does slowly evolve (see also :ref:`spec-history`), introducing new features and - occasionally changing the meaning of existing features. By + occasionally changing the meaning of existing features. By specifying which version of the specification you are using it enables programs which process the package description to know what syntax to expect and what each part means. @@ -812,7 +812,9 @@ Older tools will of course only work with older versions of the Cabal specification that was known at the time. Most of the time, tools that are too old will recognise this fact and produce a - suitable error message. + suitable error message. Likewise, ``cabal check`` will tell you + whether the version number is sufficiently high for the features + you use in the package description. As for behaviour, new versions of the Cabal specification can change the meaning of existing syntax. This means if you want to take advantage @@ -2435,10 +2437,10 @@ A list of libraries that are supposed to be copied from the build directory alongside the produced Haskell libraries. Note that you - are under the obligation to produce those lirbaries in the build + are under the obligation to produce those libraries in the build directory (e.g. via a custom setup). Libraries listed here will be included when ``copy``-ing packages and be listed in the - ``hs-libraries`` of the package configuration. + ``hs-libraries`` of the package configuration in the package database. .. pkg-field:: extra-lib-dirs: directory list @@ -2492,10 +2494,11 @@ the system and to find the extra compilation and linker options needed to use the packages. - If you need to bind to a C library that supports ``pkg-config`` (use - ``pkg-config --list-all`` to find out if it is supported) then it is - much preferable to use this field rather than hard code options into - the other fields. + If you need to bind to a C library that supports ``pkg-config`` then + it is much preferable to use this field rather than hard code options + into the other fields. ``pkg-config --list-all`` will show you all + supported libraries. Depending on your system you may need to adjust + ``PKG_CONFIG_PATH``. .. pkg-field:: frameworks: token list diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/file-format-changelog.rst cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/file-format-changelog.rst --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/file-format-changelog.rst 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/file-format-changelog.rst 2018-11-27 22:49:58.000000000 +0000 @@ -19,6 +19,16 @@ versions of the ``Cabal`` library denote unreleased development branches which have no stability guarantee. +``cabal-version: 3.0`` +---------------------- + +* Added the `extra-dynamic-library-flavours` field to specify non-trivial + variants of dynamic flavours. It is `extra-library-flavours` but for + shared libraries. Mainly useful for GHC's RTS library. + +* License fields use identifiers from SPDX License List version + ``3.3 2018-10-24`` + ``cabal-version: 2.4`` ---------------------- @@ -95,7 +105,7 @@ * New CPP Macro ``CURRENT_PACKAGE_VERSION``. ``cabal-version: 1.24`` ----------------------- +----------------------- * New :pkg-section:`custom-setup` stanza and :pkg-field:`custom-setup:setup-depends` field added for specifying dependencies @@ -110,7 +120,7 @@ extra locations to find OS X frameworks. ``cabal-version: 1.22`` ----------------------- +----------------------- * New :pkg-field:`library:reexported-modules` field. @@ -120,7 +130,7 @@ * New :pkg-field:`license` type ``ISC`` added. ``cabal-version: 1.20`` ----------------------- +----------------------- * Add support for new :pkg-field:`license-files` field for declaring multiple license documents. @@ -130,7 +140,7 @@ * New :pkg-field:`license` types ``BSD2`` and ``MPL-2.0`` added. ``cabal-version: 1.18`` ----------------------- +----------------------- * Add support for new :pkg-field:`extra-doc-files` field for specifying extra file assets referenced by the Haddock @@ -144,7 +154,7 @@ * Add ``getSysconfDir`` operation to ``Paths_`` API. ``cabal-version: 1.16`` ----------------------- +----------------------- .. todo:: @@ -152,7 +162,7 @@ 1.12 and 1.18; ``cabal-version: 1.12`` ----------------------- +----------------------- * Change syntax of :pkg-field:`cabal-version` to support the new recommended ``cabal-version: x.y`` style diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/nix-local-build.rst cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/nix-local-build.rst --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/doc/nix-local-build.rst 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/doc/nix-local-build.rst 2018-11-27 22:49:58.000000000 +0000 @@ -4,7 +4,9 @@ ========== Suppose that you are in a directory containing a single Cabal package -which you wish to build. You can configure and build it using Nix-style +which you wish to build (if you haven't set up a package yet check +out `developing packages `__ for +instructions). You can configure and build it using Nix-style local builds with this command (configuring is not necessary): :: @@ -178,7 +180,7 @@ executable or test suite named ``pexe``, it would be located at ``dist-newstyle/build/p-0.1/build/pexe/pexe``. -- In cabal-install-2.0 and above, the dist directory for a package ``p-0.1`` +- In cabal-install-2.0, the dist directory for a package ``p-0.1`` defining a library built with GHC 8.0.1 on 64-bit Linux is ``dist-newstyle/build/x86_64-linux/ghc-8.0.1/p-0.1``. When per-component builds are enabled (any non-Custom package), a @@ -189,6 +191,17 @@ ``dist-newstyle/build/x86_64-linux/ghc-8.0.1/p-0.1/c/pexe/build/pexe/pexe`` (you can see why we want this to be an implementation detail!) +- In cabal-install-2.2 and above, the ``/c/`` part of the above path + is replaced with one of ``/l/``, ``/x/``, ``/f/``, ``/t/``, or + ``/b/``, depending on the type of component (sublibrary, + executable, foreign library, test suite, or benchmark + respectively). So the full path to an executable named ``pexe`` + compiled with GHC 8.0.1 on a 64-bit Linux is now + ``dist-newstyle/build/x86_64-linux/ghc-8.0.1/p-0.1/x/pexe/build/pexe/pexe``; + for a benchmark named ``pbench`` it now is + ``dist-newstyle/build/x86_64-linux/ghc-8.0.1/p-0.1/b/pbench/build/pbench/pbench``; + + The paths are a bit longer in 2.0 and above but the benefit is that you can transparently have multiple builds with different versions of GHC. We plan to add the ability to create aliases for certain build @@ -308,7 +321,7 @@ project contains multiple remote package repositories it will update the index of all of them (e.g. when using overlays). -Seom examples: +Some examples: :: @@ -368,6 +381,12 @@ ``--enable-profiling`` will automatically make sure profiling libraries for all transitive dependencies are built and installed.) +In addition ``cabal new-build`` accepts these flags: + +- ``--only-configure``: When given we will forgoe performing a full build and + abort after running the configure phase of each target package. + + cabal new-repl -------------- @@ -688,9 +707,9 @@ directories ``foo`` and ``bar``, use ``packages: */*.cabal ../{foo,bar}/`` - 3. [STRIKEOUT:They can specify an ``http``, ``https`` or ``file`` + 3. They can specify an ``http``, ``https`` or ``file`` URL, representing the path to a remote tarball to be downloaded - and built.] (not implemented yet) + and built. There is no command line variant of this field; see :issue:`3585`. @@ -1905,6 +1924,21 @@ Advanced global configuration options ------------------------------------- +.. cfg-field:: write-ghc-environment-files: always, never, or ghc-8.4.4+ + --write-ghc-enviroment-files=policy + :synopsis: Whether a ``.ghc.enviroment`` should be created after a successful build. + + :default: ``ghc-8.4.4+`` + + Whether a `GHC package environment file `_ + should be created after a successful build. + + Defaults to creating them only when compiling with GHC 8.4.4 and + older (GHC 8.4.4 `is the first version `_ that supports the + ``-package-env -`` option that allows ignoring the package + environment files). + + .. cfg-field:: http-transport: curl, wget, powershell, or plain-http --http-transport=transport :synopsis: Transport to use with http(s) requests. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Language/Haskell/Extension.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Language/Haskell/Extension.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/Language/Haskell/Extension.hs 2018-10-17 15:56:23.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/Language/Haskell/Extension.hs 2018-11-27 22:49:57.000000000 +0000 @@ -803,6 +803,10 @@ -- /strategy/. | DerivingStrategies + -- | Enable deriving instances via types of the same runtime representation. + -- Implies 'DerivingStrategies'. + | DerivingVia + -- | Enable the use of unboxed sum syntax. | UnboxedSums @@ -828,7 +832,7 @@ instance NFData KnownExtension where rnf = genericRnf {-# DEPRECATED knownExtensions - "KnownExtension is an instance of Enum and Bounded, use those instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-} + "KnownExtension is an instance of Enum and Bounded, use those instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-} knownExtensions :: [KnownExtension] knownExtensions = [minBound..maxBound] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/Instances/TreeDiff.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/Instances/TreeDiff.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/Instances/TreeDiff.hs 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/Instances/TreeDiff.hs 2018-11-27 22:49:58.000000000 +0000 @@ -70,6 +70,7 @@ instance ToExpr LegacyExeDependency where toExpr = defaultExprViaShow instance ToExpr LibVersionInfo where toExpr = defaultExprViaShow instance ToExpr Library +instance ToExpr LibraryName instance ToExpr Mixin where toExpr = defaultExprViaShow instance ToExpr ModuleName where toExpr = defaultExprViaShow instance ToExpr ModuleReexport diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/leading-comma.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/leading-comma.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/leading-comma.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/leading-comma.errors 2018-11-27 22:49:58.000000000 +0000 @@ -3,6 +3,3 @@ unexpected end of input expecting white space -deepseq, -transformers, - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion2.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion2.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion2.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion2.errors 2018-11-27 22:49:58.000000000 +0000 @@ -3,5 +3,3 @@ unexpected major bounded version syntax (caret, ^>=) used. To use this syntax the package need to specify at least 'cabal-version: 2.0'. Alternatively, if broader compatibility is important then use: >=2.0 && <2.1 expecting "." or "-" -bad-package ^>= 2.0 - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/noVersion.errors 2018-11-27 22:49:58.000000000 +0000 @@ -2,5 +2,3 @@ noVersion.cabal:10:38: unexpected -none version range used. To use this syntax the package needs to specify at least 'cabal-version: 1.22'. Alternatively, if broader compatibility is important then use <0 or other empty range. -bad-package -none - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/range-ge-wild.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/range-ge-wild.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/range-ge-wild.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/range-ge-wild.errors 2018-11-27 22:49:58.000000000 +0000 @@ -2,5 +2,3 @@ range-ge-wild.cabal:10:16: unexpected wild-card version after non-== operator: ">=" -base >= 4.* - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-1.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-1.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-1.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-1.errors 2018-11-27 22:49:58.000000000 +0000 @@ -2,5 +2,3 @@ spdx-1.cabal:6:26: unexpected Unknown SPDX license identifier: 'BSD3' Do you mean BSD-3-Clause? -BSD3 - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-2.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-2.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-2.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-2.errors 2018-11-27 22:49:58.000000000 +0000 @@ -2,5 +2,3 @@ spdx-2.cabal:6:30: unexpected Unknown SPDX license identifier: 'AGPL-1.0' -AGPL-1.0 - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-3.errors cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-3.errors --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-3.errors 2018-10-17 15:56:24.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/errors/spdx-3.errors 2018-11-27 22:49:58.000000000 +0000 @@ -2,5 +2,3 @@ spdx-3.cabal:6:35: unexpected Unknown SPDX license identifier: 'AGPL-1.0-only' -AGPL-1.0-only - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common2.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common2.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common2.expr 2018-10-17 15:56:27.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common2.expr 2018-11-27 22:49:58.000000000 +0000 @@ -11,7 +11,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -32,6 +34,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -56,7 +59,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -66,9 +71,16 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,10]`) - (EarlierVersion `mkVersion [4,11]`)), - Dependency `PackageName "containers"` AnyVersion, - Dependency `PackageName "ghc-prim"` AnyVersion], + (EarlierVersion `mkVersion [4,11]`)) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "containers"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "ghc-prim"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["ElseIf"]`], libBuildInfo = BuildInfo @@ -89,6 +101,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -117,13 +130,19 @@ (OrLaterVersion `mkVersion [4,10]`) (EarlierVersion - `mkVersion [4,11]`)), + `mkVersion [4,11]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "containers"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "ghc-prim"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -140,7 +159,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -160,6 +181,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -184,7 +206,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteUnsupported (TestTypeUnknown @@ -198,7 +222,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -218,6 +244,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -242,7 +269,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteUnsupported (TestTypeUnknown @@ -274,6 +303,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -307,9 +337,16 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,10]`) - (EarlierVersion `mkVersion [4,11]`)), - Dependency `PackageName "containers"` AnyVersion, - Dependency `PackageName "HUnit"` AnyVersion], + (EarlierVersion `mkVersion [4,11]`)) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "containers"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "HUnit"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -329,6 +366,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -357,13 +395,19 @@ (OrLaterVersion `mkVersion [4,10]`) (EarlierVersion - `mkVersion [4,11]`)), + `mkVersion [4,11]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "containers"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "HUnit"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "Tests.hs", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common.expr 2018-10-17 15:56:26.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/common.expr 2018-11-27 22:49:58.000000000 +0000 @@ -6,7 +6,9 @@ CondNode {condTreeComponents = [], condTreeConstraints = [Dependency - `PackageName "ghc-prim"` AnyVersion], + `PackageName "ghc-prim"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["ElseIf"]`], libBuildInfo = BuildInfo @@ -27,6 +29,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -51,7 +54,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "ghc-prim"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -63,7 +68,9 @@ CondNode {condTreeComponents = [], condTreeConstraints = [Dependency - `PackageName "HUnit"` AnyVersion], + `PackageName "HUnit"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -83,6 +90,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -107,7 +115,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "HUnit"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "Tests.hs", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif2.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif2.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif2.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif2.expr 2018-11-27 22:49:58.000000000 +0000 @@ -34,6 +34,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -66,7 +67,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -87,6 +90,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -111,7 +115,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "Win32"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -138,6 +144,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -170,7 +177,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -191,6 +200,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -215,7 +225,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -242,6 +254,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/elif.expr 2018-11-27 22:49:58.000000000 +0000 @@ -11,7 +11,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -32,6 +34,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -56,7 +59,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -83,6 +88,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/encoding-0.8.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/encoding-0.8.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/encoding-0.8.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/encoding-0.8.expr 2018-11-27 22:49:58.000000000 +0000 @@ -10,7 +10,8 @@ (VersionRangeParens (UnionVersionRanges (LaterVersion `mkVersion [4,4]`) - (ThisVersion `mkVersion [4,4]`)))], + (ThisVersion `mkVersion [4,4]`))) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["Data","Encoding"]`], libBuildInfo = BuildInfo @@ -31,6 +32,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -66,7 +68,9 @@ (LaterVersion `mkVersion [4,4]`) (ThisVersion - `mkVersion [4,4]`)))], + `mkVersion [4,4]`))) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -105,10 +109,12 @@ {defaultSetupDepends = False, setupDepends = [Dependency `PackageName "base"` - (EarlierVersion `mkVersion [5]`), + (EarlierVersion `mkVersion [5]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "ghc-prim"` - AnyVersion]}, + AnyVersion + (Set.fromList [LMainLibName])]}, sourceRepos = [], specVersionRaw = Right (OrLaterVersion `mkVersion [1,12]`), stability = "", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/generics-sop.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/generics-sop.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/generics-sop.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/generics-sop.expr 2018-11-27 22:49:58.000000000 +0000 @@ -15,7 +15,9 @@ (OrLaterVersion `mkVersion [0,7]`) (EarlierVersion - `mkVersion [0,9]`))], + `mkVersion [0,9]`)) + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -36,6 +38,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -64,7 +67,9 @@ (OrLaterVersion `mkVersion [0,7]`) (EarlierVersion - `mkVersion [0,9]`))], + `mkVersion [0,9]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -81,14 +86,18 @@ (OrLaterVersion `mkVersion [0,3]`) (EarlierVersion - `mkVersion [0,6]`)), + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "transformers"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,3]`) (EarlierVersion - `mkVersion [0,6]`))], + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -109,6 +118,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -137,14 +147,18 @@ (OrLaterVersion `mkVersion [0,3]`) (EarlierVersion - `mkVersion [0,6]`)), + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "transformers"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,3]`) (EarlierVersion - `mkVersion [0,6]`))], + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -177,6 +191,7 @@ AutoDeriveTypeable], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -231,6 +246,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -264,22 +280,26 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,7]`) - (EarlierVersion `mkVersion [5]`)), + (EarlierVersion `mkVersion [5]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "template-haskell"` (IntersectVersionRanges (OrLaterVersion `mkVersion [2,8]`) - (EarlierVersion `mkVersion [2,13]`)), + (EarlierVersion `mkVersion [2,13]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "ghc-prim"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,3]`) - (EarlierVersion `mkVersion [0,6]`)), + (EarlierVersion `mkVersion [0,6]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "deepseq"` (IntersectVersionRanges (OrLaterVersion `mkVersion [1,3]`) - (EarlierVersion `mkVersion [1,5]`))], + (EarlierVersion `mkVersion [1,5]`)) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["Generics","SOP"]`, `ModuleName ["Generics","SOP","GGP"]`, @@ -347,6 +367,7 @@ FunctionalDependencies], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -386,28 +407,36 @@ (OrLaterVersion `mkVersion [4,7]`) (EarlierVersion - `mkVersion [5]`)), + `mkVersion [5]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "template-haskell"` (IntersectVersionRanges (OrLaterVersion `mkVersion [2,8]`) (EarlierVersion - `mkVersion [2,13]`)), + `mkVersion [2,13]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "ghc-prim"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,3]`) (EarlierVersion - `mkVersion [0,6]`)), + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "deepseq"` (IntersectVersionRanges (OrLaterVersion `mkVersion [1,3]`) (EarlierVersion - `mkVersion [1,5]`))], + `mkVersion [1,5]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -418,12 +447,16 @@ `UnqualComponentName "doctests"` CondNode {condTreeComponents = [], - condTreeConstraints = [Dependency `PackageName "base"` AnyVersion, + condTreeConstraints = [Dependency + `PackageName "base"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "doctest"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,13]`) - (EarlierVersion `mkVersion [0,14]`))], + (EarlierVersion `mkVersion [0,14]`)) + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -445,6 +478,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -471,14 +505,18 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "base"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "doctest"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,13]`) (EarlierVersion - `mkVersion [0,14]`))], + `mkVersion [0,14]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "doctests.hs", @@ -491,9 +529,12 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,6]`) - (EarlierVersion `mkVersion [5]`)), + (EarlierVersion `mkVersion [5]`)) + (Set.fromList [LMainLibName]), Dependency - `PackageName "generics-sop"` AnyVersion], + `PackageName "generics-sop"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -513,6 +554,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -541,10 +583,14 @@ (OrLaterVersion `mkVersion [4,6]`) (EarlierVersion - `mkVersion [5]`)), + `mkVersion [5]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "generics-sop"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "Example.hs", @@ -605,16 +651,21 @@ SetupBuildInfo {defaultSetupDepends = False, setupDepends = [Dependency - `PackageName "base"` AnyVersion, + `PackageName "base"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency - `PackageName "Cabal"` AnyVersion, + `PackageName "Cabal"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "cabal-doctest"` (IntersectVersionRanges (OrLaterVersion `mkVersion [1,0,2]`) (EarlierVersion - `mkVersion [1,1]`))]}, + `mkVersion [1,1]`)) + (Set.fromList [LMainLibName])]}, sourceRepos = [SourceRepo {repoBranch = Nothing, repoKind = RepoHead, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/ghc-option-j.check cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/ghc-option-j.check --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/ghc-option-j.check 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/ghc-option-j.check 2018-11-27 22:49:58.000000000 +0000 @@ -1,2 +1,2 @@ 'ghc-options: -j[N]' can make sense for specific user's setup, but it is not appropriate for a distributed package. Alternatively, if you want to use this, make it conditional based on a Cabal configuration flag (with 'manual: True' and 'default: False') and enable that flag during development. -'ghc-options: -j[N]' can make sense for specific user's setup, but it is not appropriate for a distributed package. Alternatively, if you want to use this, make it conditional based on a Cabal configuration flag (with 'manual: True' and 'default: False') and enable that flag during development. +'ghc-shared-options: -j[N]' can make sense for specific user's setup, but it is not appropriate for a distributed package. Alternatively, if you want to use this, make it conditional based on a Cabal configuration flag (with 'manual: True' and 'default: False') and enable that flag during development. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/haddock-api-2.18.1-check.check cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/haddock-api-2.18.1-check.check --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/haddock-api-2.18.1-check.check 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/haddock-api-2.18.1-check.check 2018-11-27 22:49:58.000000000 +0000 @@ -2,10 +2,3 @@ unexpected major bounded version syntax (caret, ^>=) used. To use this syntax the package need to specify at least 'cabal-version: 2.0'. Alternatively, if broader compatibility is important then use: >=4.10.0 && <4.11 expecting "." or "-" -base ^>= 4.10.0 -, Cabal ^>= 2.0.0 -, ghc ^>= 8.2 -, ghc-paths ^>= 0.1.0.9 -, haddock-library == 1.4.4.* -, xhtml ^>= 3000.2.2 - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-5055.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-5055.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-5055.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-5055.expr 2018-11-27 22:49:58.000000000 +0000 @@ -8,7 +8,8 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,8]`) - (EarlierVersion `mkVersion [5]`))], + (EarlierVersion `mkVersion [5]`)) + (Set.fromList [LMainLibName])], condTreeData = Executable {buildInfo = BuildInfo {asmOptions = [], @@ -28,6 +29,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -56,7 +58,9 @@ (OrLaterVersion `mkVersion [4,8]`) (EarlierVersion - `mkVersion [5]`))], + `mkVersion [5]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, exeName = `UnqualComponentName "flag-test-exe"`, exeScope = ExecutablePublic, @@ -92,6 +96,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -125,7 +130,8 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,8]`) - (EarlierVersion `mkVersion [5]`))], + (EarlierVersion `mkVersion [5]`)) + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -145,6 +151,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -173,7 +180,9 @@ (OrLaterVersion `mkVersion [4,8]`) (EarlierVersion - `mkVersion [5]`))], + `mkVersion [5]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "SecondMain.hs", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-774.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-774.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-774.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/issue-774.expr 2018-11-27 22:49:58.000000000 +0000 @@ -26,6 +26,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/leading-comma.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/leading-comma.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/leading-comma.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/leading-comma.expr 2018-11-27 22:49:58.000000000 +0000 @@ -5,12 +5,30 @@ condLibrary = Just CondNode {condTreeComponents = [], - condTreeConstraints = [Dependency `PackageName "base"` AnyVersion, - Dependency `PackageName "containers"` AnyVersion, - Dependency `PackageName "deepseq"` AnyVersion, - Dependency `PackageName "transformers"` AnyVersion, - Dependency `PackageName "filepath"` AnyVersion, - Dependency `PackageName "directory"` AnyVersion], + condTreeConstraints = [Dependency + `PackageName "base"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "containers"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "deepseq"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "transformers"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "filepath"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "directory"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["LeadingComma"]`], libBuildInfo = BuildInfo @@ -31,6 +49,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -55,22 +74,34 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "base"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "containers"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "deepseq"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "transformers"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "filepath"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "directory"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/MiniAgda.check cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/MiniAgda.check --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/MiniAgda.check 2018-10-17 15:56:25.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/MiniAgda.check 2018-11-27 22:49:58.000000000 +0000 @@ -1 +1 @@ -MiniAgda.cabal:0:0: Version digit with leading zero. Use cabal-version: 2.0 or later to write such versions. For more information see https://github.com/haskell/cabal/issues/5092 +MiniAgda.cabal:2:27: Version digit with leading zero. Use cabal-version: 2.0 or later to write such versions. For more information see https://github.com/haskell/cabal/issues/5092 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/nothing-unicode.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/nothing-unicode.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/nothing-unicode.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/nothing-unicode.expr 2018-11-27 22:49:58.000000000 +0000 @@ -30,6 +30,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -79,6 +80,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/noVersion.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/noVersion.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/noVersion.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/noVersion.expr 2018-11-27 22:49:58.000000000 +0000 @@ -9,7 +9,8 @@ `PackageName "bad-package"` (IntersectVersionRanges (LaterVersion `mkVersion [1]`) - (EarlierVersion `mkVersion [1]`))], + (EarlierVersion `mkVersion [1]`)) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["ElseIf"]`], libBuildInfo = BuildInfo @@ -30,6 +31,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -58,7 +60,9 @@ (LaterVersion `mkVersion [1]`) (EarlierVersion - `mkVersion [1]`))], + `mkVersion [1]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/Octree-0.5.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/Octree-0.5.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/Octree-0.5.expr 2018-10-17 15:56:26.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/Octree-0.5.expr 2018-11-27 22:49:58.000000000 +0000 @@ -9,13 +9,16 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,0]`) - (EarlierVersion `mkVersion [4,7]`)), + (EarlierVersion `mkVersion [4,7]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "AC-Vector"` - (OrLaterVersion `mkVersion [2,3,0]`), + (OrLaterVersion `mkVersion [2,3,0]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "QuickCheck"` - (OrLaterVersion `mkVersion [2,4,0]`)], + (OrLaterVersion `mkVersion [2,4,0]`) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["Data","Octree"]`], libBuildInfo = BuildInfo @@ -36,6 +39,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -65,15 +69,21 @@ (OrLaterVersion `mkVersion [4,0]`) (EarlierVersion - `mkVersion [4,7]`)), + `mkVersion [4,7]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "AC-Vector"` (OrLaterVersion - `mkVersion [2,3,0]`), + `mkVersion [2,3,0]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "QuickCheck"` (OrLaterVersion - `mkVersion [2,4,0]`)], + `mkVersion [2,4,0]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -88,13 +98,16 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,0]`) - (EarlierVersion `mkVersion [4,7]`)), + (EarlierVersion `mkVersion [4,7]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "AC-Vector"` - (OrLaterVersion `mkVersion [2,3,0]`), + (OrLaterVersion `mkVersion [2,3,0]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "QuickCheck"` - (OrLaterVersion `mkVersion [2,4,0]`)], + (OrLaterVersion `mkVersion [2,4,0]`) + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -114,6 +127,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -142,15 +156,21 @@ (OrLaterVersion `mkVersion [4,0]`) (EarlierVersion - `mkVersion [4,7]`)), + `mkVersion [4,7]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "AC-Vector"` (OrLaterVersion - `mkVersion [2,3,0]`), + `mkVersion [2,3,0]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "QuickCheck"` (OrLaterVersion - `mkVersion [2,4,0]`)], + `mkVersion [2,4,0]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` @@ -164,15 +184,20 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,0]`) - (EarlierVersion `mkVersion [4,7]`)), + (EarlierVersion `mkVersion [4,7]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "AC-Vector"` - (OrLaterVersion `mkVersion [2,3,0]`), + (OrLaterVersion `mkVersion [2,3,0]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "QuickCheck"` - (OrLaterVersion `mkVersion [2,4,0]`), + (OrLaterVersion `mkVersion [2,4,0]`) + (Set.fromList [LMainLibName]), Dependency - `PackageName "markdown-unlit"` AnyVersion], + `PackageName "markdown-unlit"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -192,6 +217,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -223,18 +249,26 @@ (OrLaterVersion `mkVersion [4,0]`) (EarlierVersion - `mkVersion [4,7]`)), + `mkVersion [4,7]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "AC-Vector"` (OrLaterVersion - `mkVersion [2,3,0]`), + `mkVersion [2,3,0]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "QuickCheck"` (OrLaterVersion - `mkVersion [2,4,0]`), + `mkVersion [2,4,0]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "markdown-unlit"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "README.lhs", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/shake.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/shake.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/shake.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/shake.expr 2018-11-27 22:49:58.000000000 +0000 @@ -28,6 +28,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -70,7 +71,9 @@ condTreeConstraints = [Dependency `PackageName "unix"` (OrLaterVersion - `mkVersion [2,5,1]`)], + `mkVersion [2,5,1]`) + (Set.fromList + [LMainLibName])], condTreeData = Executable {buildInfo = BuildInfo {asmOptions = [], @@ -90,6 +93,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -115,7 +119,9 @@ targetBuildDepends = [Dependency `PackageName "unix"` (OrLaterVersion - `mkVersion [2,5,1]`)], + `mkVersion [2,5,1]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, exeName = `UnqualComponentName "shake"`, exeScope = ExecutablePublic, @@ -140,6 +146,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -175,7 +182,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "old-time"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Executable {buildInfo = BuildInfo {asmOptions = [], @@ -195,6 +204,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -219,7 +229,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "old-time"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, exeName = `UnqualComponentName "shake"`, exeScope = ExecutablePublic, @@ -244,6 +256,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -278,7 +291,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Executable {buildInfo = BuildInfo {asmOptions = [], @@ -298,6 +313,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -322,44 +338,81 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, exeName = `UnqualComponentName "shake"`, exeScope = ExecutablePublic, modulePath = ""}}}], condTreeConstraints = [Dependency `PackageName "base"` - (WildcardVersion `mkVersion [4]`), - Dependency `PackageName "directory"` AnyVersion, + (WildcardVersion `mkVersion [4]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "directory"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "hashable"` - (OrLaterVersion `mkVersion [1,1,2,3]`), - Dependency `PackageName "binary"` AnyVersion, - Dependency `PackageName "filepath"` AnyVersion, + (OrLaterVersion `mkVersion [1,1,2,3]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "binary"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "filepath"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "process"` - (OrLaterVersion `mkVersion [1,1]`), + (OrLaterVersion `mkVersion [1,1]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "unordered-containers"` - (OrLaterVersion `mkVersion [0,2,1]`), - Dependency `PackageName "bytestring"` AnyVersion, + (OrLaterVersion `mkVersion [0,2,1]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "bytestring"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "utf8-string"` - (OrLaterVersion `mkVersion [0,3]`), - Dependency `PackageName "time"` AnyVersion, - Dependency `PackageName "random"` AnyVersion, - Dependency `PackageName "js-jquery"` AnyVersion, - Dependency `PackageName "js-flot"` AnyVersion, + (OrLaterVersion `mkVersion [0,3]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "time"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "random"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "js-jquery"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "js-flot"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "transformers"` - (OrLaterVersion `mkVersion [0,2]`), + (OrLaterVersion `mkVersion [0,2]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "extra"` - (OrLaterVersion `mkVersion [1,4,8]`), + (OrLaterVersion `mkVersion [1,4,8]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "deepseq"` - (OrLaterVersion `mkVersion [1,1]`), - Dependency `PackageName "primitive"` AnyVersion], + (OrLaterVersion `mkVersion [1,1]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "primitive"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = Executable {buildInfo = BuildInfo {asmOptions = [], @@ -379,6 +432,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -462,62 +516,96 @@ targetBuildDepends = [Dependency `PackageName "base"` (WildcardVersion - `mkVersion [4]`), + `mkVersion [4]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "directory"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "hashable"` (OrLaterVersion - `mkVersion [1,1,2,3]`), + `mkVersion [1,1,2,3]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "binary"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "filepath"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "process"` (OrLaterVersion - `mkVersion [1,1]`), + `mkVersion [1,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "unordered-containers"` (OrLaterVersion - `mkVersion [0,2,1]`), + `mkVersion [0,2,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "bytestring"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "utf8-string"` (OrLaterVersion - `mkVersion [0,3]`), + `mkVersion [0,3]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "time"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "random"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "js-jquery"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "js-flot"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "transformers"` (OrLaterVersion - `mkVersion [0,2]`), + `mkVersion [0,2]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "extra"` (OrLaterVersion - `mkVersion [1,4,8]`), + `mkVersion [1,4,8]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "deepseq"` (OrLaterVersion - `mkVersion [1,1]`), + `mkVersion [1,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "primitive"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, exeName = `UnqualComponentName "shake"`, exeScope = ExecutablePublic, @@ -537,7 +625,9 @@ condTreeConstraints = [Dependency `PackageName "unix"` (OrLaterVersion - `mkVersion [2,5,1]`)], + `mkVersion [2,5,1]`) + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -558,6 +648,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -583,7 +674,9 @@ targetBuildDepends = [Dependency `PackageName "unix"` (OrLaterVersion - `mkVersion [2,5,1]`)], + `mkVersion [2,5,1]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -610,6 +703,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -646,7 +740,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "old-time"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -667,6 +763,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -691,7 +788,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "old-time"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -718,6 +817,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -753,7 +853,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = Library {exposedModules = [], libBuildInfo = BuildInfo @@ -774,6 +876,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -798,7 +901,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -806,36 +911,68 @@ signatures = []}}}], condTreeConstraints = [Dependency `PackageName "base"` - (OrLaterVersion `mkVersion [4,5]`), - Dependency `PackageName "directory"` AnyVersion, + (OrLaterVersion `mkVersion [4,5]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "directory"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "hashable"` - (OrLaterVersion `mkVersion [1,1,2,3]`), - Dependency `PackageName "binary"` AnyVersion, - Dependency `PackageName "filepath"` AnyVersion, + (OrLaterVersion `mkVersion [1,1,2,3]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "binary"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "filepath"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "process"` - (OrLaterVersion `mkVersion [1,1]`), + (OrLaterVersion `mkVersion [1,1]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "unordered-containers"` - (OrLaterVersion `mkVersion [0,2,1]`), - Dependency `PackageName "bytestring"` AnyVersion, + (OrLaterVersion `mkVersion [0,2,1]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "bytestring"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "utf8-string"` - (OrLaterVersion `mkVersion [0,3]`), - Dependency `PackageName "time"` AnyVersion, - Dependency `PackageName "random"` AnyVersion, - Dependency `PackageName "js-jquery"` AnyVersion, - Dependency `PackageName "js-flot"` AnyVersion, + (OrLaterVersion `mkVersion [0,3]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "time"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "random"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "js-jquery"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "js-flot"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "transformers"` - (OrLaterVersion `mkVersion [0,2]`), + (OrLaterVersion `mkVersion [0,2]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "extra"` - (OrLaterVersion `mkVersion [1,4,8]`), + (OrLaterVersion `mkVersion [1,4,8]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "deepseq"` - (OrLaterVersion `mkVersion [1,1]`)], + (OrLaterVersion `mkVersion [1,1]`) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["Development","Shake"]`, `ModuleName ["Development","Shake","Classes"]`, @@ -863,6 +1000,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -929,59 +1067,91 @@ targetBuildDepends = [Dependency `PackageName "base"` (OrLaterVersion - `mkVersion [4,5]`), + `mkVersion [4,5]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "directory"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "hashable"` (OrLaterVersion - `mkVersion [1,1,2,3]`), + `mkVersion [1,1,2,3]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "binary"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "filepath"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "process"` (OrLaterVersion - `mkVersion [1,1]`), + `mkVersion [1,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "unordered-containers"` (OrLaterVersion - `mkVersion [0,2,1]`), + `mkVersion [0,2,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "bytestring"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "utf8-string"` (OrLaterVersion - `mkVersion [0,3]`), + `mkVersion [0,3]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "time"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "random"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "js-jquery"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "js-flot"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "transformers"` (OrLaterVersion - `mkVersion [0,2]`), + `mkVersion [0,2]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "extra"` (OrLaterVersion - `mkVersion [1,4,8]`), + `mkVersion [1,4,8]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "deepseq"` (OrLaterVersion - `mkVersion [1,1]`)], + `mkVersion [1,1]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -1016,6 +1186,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1072,6 +1243,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1115,7 +1287,9 @@ condTreeConstraints = [Dependency `PackageName "unix"` (OrLaterVersion - `mkVersion [2,5,1]`)], + `mkVersion [2,5,1]`) + (Set.fromList + [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -1135,6 +1309,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1160,7 +1335,9 @@ targetBuildDepends = [Dependency `PackageName "unix"` (OrLaterVersion - `mkVersion [2,5,1]`)], + `mkVersion [2,5,1]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteUnsupported (TestTypeUnknown @@ -1187,6 +1364,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1224,7 +1402,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "old-time"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -1244,6 +1424,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1268,7 +1449,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "old-time"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteUnsupported (TestTypeUnknown @@ -1295,6 +1478,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1331,7 +1515,9 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -1351,6 +1537,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1375,7 +1562,9 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "unix"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteUnsupported (TestTypeUnknown @@ -1384,39 +1573,72 @@ testName = `UnqualComponentName ""`}}}], condTreeConstraints = [Dependency `PackageName "base"` - (WildcardVersion `mkVersion [4]`), - Dependency `PackageName "directory"` AnyVersion, + (WildcardVersion `mkVersion [4]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "directory"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "hashable"` - (OrLaterVersion `mkVersion [1,1,2,3]`), - Dependency `PackageName "binary"` AnyVersion, - Dependency `PackageName "filepath"` AnyVersion, + (OrLaterVersion `mkVersion [1,1,2,3]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "binary"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "filepath"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "process"` - (OrLaterVersion `mkVersion [1,1]`), + (OrLaterVersion `mkVersion [1,1]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "unordered-containers"` - (OrLaterVersion `mkVersion [0,2,1]`), - Dependency `PackageName "bytestring"` AnyVersion, + (OrLaterVersion `mkVersion [0,2,1]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "bytestring"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "utf8-string"` - (OrLaterVersion `mkVersion [0,3]`), - Dependency `PackageName "time"` AnyVersion, - Dependency `PackageName "random"` AnyVersion, - Dependency `PackageName "js-jquery"` AnyVersion, - Dependency `PackageName "js-flot"` AnyVersion, + (OrLaterVersion `mkVersion [0,3]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "time"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "random"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "js-jquery"` + AnyVersion + (Set.fromList [LMainLibName]), + Dependency + `PackageName "js-flot"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "transformers"` - (OrLaterVersion `mkVersion [0,2]`), + (OrLaterVersion `mkVersion [0,2]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "deepseq"` - (OrLaterVersion `mkVersion [1,1]`), + (OrLaterVersion `mkVersion [1,1]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "extra"` - (OrLaterVersion `mkVersion [1,4,8]`), + (OrLaterVersion `mkVersion [1,4,8]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "QuickCheck"` - (OrLaterVersion `mkVersion [2,0]`)], + (OrLaterVersion `mkVersion [2,0]`) + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -1436,6 +1658,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -1560,63 +1783,97 @@ targetBuildDepends = [Dependency `PackageName "base"` (WildcardVersion - `mkVersion [4]`), + `mkVersion [4]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "directory"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "hashable"` (OrLaterVersion - `mkVersion [1,1,2,3]`), + `mkVersion [1,1,2,3]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "binary"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "filepath"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "process"` (OrLaterVersion - `mkVersion [1,1]`), + `mkVersion [1,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "unordered-containers"` (OrLaterVersion - `mkVersion [0,2,1]`), + `mkVersion [0,2,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "bytestring"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "utf8-string"` (OrLaterVersion - `mkVersion [0,3]`), + `mkVersion [0,3]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "time"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "random"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "js-jquery"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "js-flot"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "transformers"` (OrLaterVersion - `mkVersion [0,2]`), + `mkVersion [0,2]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "deepseq"` (OrLaterVersion - `mkVersion [1,1]`), + `mkVersion [1,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "extra"` (OrLaterVersion - `mkVersion [1,4,8]`), + `mkVersion [1,4,8]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "QuickCheck"` (OrLaterVersion - `mkVersion [2,0]`)], + `mkVersion [2,0]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "Test.hs", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-1.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-1.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-1.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-1.expr 2018-11-27 22:49:58.000000000 +0000 @@ -26,6 +26,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-2.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-2.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-2.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-2.expr 2018-11-27 22:49:58.000000000 +0000 @@ -26,6 +26,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-3.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-3.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-3.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/spdx-3.expr 2018-11-27 22:49:58.000000000 +0000 @@ -26,6 +26,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/th-lift-instances.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/th-lift-instances.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/th-lift-instances.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/th-lift-instances.expr 2018-11-27 22:49:58.000000000 +0000 @@ -9,31 +9,40 @@ `PackageName "base"` (IntersectVersionRanges (OrLaterVersion `mkVersion [4,4]`) - (EarlierVersion `mkVersion [5]`)), + (EarlierVersion `mkVersion [5]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "template-haskell"` - (EarlierVersion `mkVersion [2,10]`), - Dependency `PackageName "th-lift"` AnyVersion, + (EarlierVersion `mkVersion [2,10]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "th-lift"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "containers"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,4]`) - (EarlierVersion `mkVersion [0,6]`)), + (EarlierVersion `mkVersion [0,6]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "vector"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) - (EarlierVersion `mkVersion [0,11]`)), + (EarlierVersion `mkVersion [0,11]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "text"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,11]`) - (EarlierVersion `mkVersion [1,3]`)), + (EarlierVersion `mkVersion [1,3]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "bytestring"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) - (EarlierVersion `mkVersion [0,11]`))], + (EarlierVersion `mkVersion [0,11]`)) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["Instances","TH","Lift"]`], libBuildInfo = BuildInfo @@ -54,6 +63,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -85,42 +95,56 @@ (OrLaterVersion `mkVersion [4,4]`) (EarlierVersion - `mkVersion [5]`)), + `mkVersion [5]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "template-haskell"` (EarlierVersion - `mkVersion [2,10]`), + `mkVersion [2,10]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "th-lift"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "containers"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,4]`) (EarlierVersion - `mkVersion [0,6]`)), + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "vector"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) (EarlierVersion - `mkVersion [0,11]`)), + `mkVersion [0,11]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "text"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,11]`) (EarlierVersion - `mkVersion [1,3]`)), + `mkVersion [1,3]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "bytestring"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) (EarlierVersion - `mkVersion [0,11]`))], + `mkVersion [0,11]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, @@ -131,37 +155,48 @@ `UnqualComponentName "tests"` CondNode {condTreeComponents = [], - condTreeConstraints = [Dependency `PackageName "base"` AnyVersion, + condTreeConstraints = [Dependency + `PackageName "base"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "template-haskell"` - (EarlierVersion `mkVersion [2,10]`), + (EarlierVersion `mkVersion [2,10]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "containers"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,4]`) - (EarlierVersion `mkVersion [0,6]`)), + (EarlierVersion `mkVersion [0,6]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "vector"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) - (EarlierVersion `mkVersion [0,11]`)), + (EarlierVersion `mkVersion [0,11]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "text"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,11]`) - (EarlierVersion `mkVersion [1,2]`)), + (EarlierVersion `mkVersion [1,2]`)) + (Set.fromList [LMainLibName]), Dependency `PackageName "bytestring"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) - (EarlierVersion `mkVersion [0,11]`)), + (EarlierVersion `mkVersion [0,11]`)) + (Set.fromList [LMainLibName]), Dependency - `PackageName "th-lift-instances"` AnyVersion, + `PackageName "th-lift-instances"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "QuickCheck"` (IntersectVersionRanges (OrLaterVersion `mkVersion [2,6]`) - (EarlierVersion `mkVersion [2,8]`))], + (EarlierVersion `mkVersion [2,8]`)) + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -181,6 +216,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -206,49 +242,65 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "base"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "template-haskell"` (EarlierVersion - `mkVersion [2,10]`), + `mkVersion [2,10]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "containers"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,4]`) (EarlierVersion - `mkVersion [0,6]`)), + `mkVersion [0,6]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "vector"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) (EarlierVersion - `mkVersion [0,11]`)), + `mkVersion [0,11]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "text"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,11]`) (EarlierVersion - `mkVersion [1,2]`)), + `mkVersion [1,2]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "bytestring"` (IntersectVersionRanges (OrLaterVersion `mkVersion [0,9]`) (EarlierVersion - `mkVersion [0,11]`)), + `mkVersion [0,11]`)) + (Set.fromList + [LMainLibName]), Dependency `PackageName "th-lift-instances"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "QuickCheck"` (IntersectVersionRanges (OrLaterVersion `mkVersion [2,6]`) (EarlierVersion - `mkVersion [2,8]`))], + `mkVersion [2,8]`)) + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "Main.hs", @@ -281,6 +333,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -312,14 +365,22 @@ "" `mkVersion []`), testName = `UnqualComponentName ""`}}}], - condTreeConstraints = [Dependency `PackageName "base"` AnyVersion, + condTreeConstraints = [Dependency + `PackageName "base"` + AnyVersion + (Set.fromList [LMainLibName]), Dependency `PackageName "directory"` - (OrLaterVersion `mkVersion [1,0]`), + (OrLaterVersion `mkVersion [1,0]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "doctest"` - (OrLaterVersion `mkVersion [0,9,1]`), - Dependency `PackageName "filepath"` AnyVersion], + (OrLaterVersion `mkVersion [0,9,1]`) + (Set.fromList [LMainLibName]), + Dependency + `PackageName "filepath"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = TestSuite {testBuildInfo = BuildInfo {asmOptions = [], @@ -339,6 +400,7 @@ defaultExtensions = [], defaultLanguage = Just Haskell2010, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -365,18 +427,26 @@ staticOptions = [], targetBuildDepends = [Dependency `PackageName "base"` - AnyVersion, + AnyVersion + (Set.fromList + [LMainLibName]), Dependency `PackageName "directory"` (OrLaterVersion - `mkVersion [1,0]`), + `mkVersion [1,0]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "doctest"` (OrLaterVersion - `mkVersion [0,9,1]`), + `mkVersion [0,9,1]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "filepath"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, testInterface = TestSuiteExeV10 `mkVersion [1,0]` "doctests.hs", diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.expr cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.expr --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.expr 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.expr 2018-11-27 22:49:58.000000000 +0000 @@ -6,12 +6,16 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "base"` - (EarlierVersion `mkVersion [5]`), + (EarlierVersion `mkVersion [5]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "str-string"` - (OrLaterVersion `mkVersion [0,1,0,0]`), + (OrLaterVersion `mkVersion [0,1,0,0]`) + (Set.fromList [LMainLibName]), Dependency - `PackageName "wl-pprint-indef"` AnyVersion], + `PackageName "wl-pprint-indef"` + AnyVersion + (Set.fromList [LMainLibName])], condTreeData = Executable {buildInfo = BuildInfo {asmOptions = [], @@ -31,6 +35,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -56,14 +61,20 @@ targetBuildDepends = [Dependency `PackageName "base"` (EarlierVersion - `mkVersion [5]`), + `mkVersion [5]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "str-string"` (OrLaterVersion - `mkVersion [0,1,0,0]`), + `mkVersion [0,1,0,0]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "wl-pprint-indef"` - AnyVersion], + AnyVersion + (Set.fromList + [LMainLibName])], virtualModules = []}, exeName = `UnqualComponentName "wl-pprint-string-example"`, exeScope = ExecutablePublic, @@ -74,10 +85,12 @@ {condTreeComponents = [], condTreeConstraints = [Dependency `PackageName "base"` - (EarlierVersion `mkVersion [5]`), + (EarlierVersion `mkVersion [5]`) + (Set.fromList [LMainLibName]), Dependency `PackageName "str-sig"` - (OrLaterVersion `mkVersion [0,1,0,0]`)], + (OrLaterVersion `mkVersion [0,1,0,0]`) + (Set.fromList [LMainLibName])], condTreeData = Library {exposedModules = [`ModuleName ["Text","PrettyPrint","Leijen"]`], libBuildInfo = BuildInfo @@ -98,6 +111,7 @@ defaultExtensions = [], defaultLanguage = Nothing, extraBundledLibs = [], + extraDynLibFlavours = [], extraFrameworkDirs = [], extraGHCiLibs = [], extraLibDirs = [], @@ -123,11 +137,15 @@ targetBuildDepends = [Dependency `PackageName "base"` (EarlierVersion - `mkVersion [5]`), + `mkVersion [5]`) + (Set.fromList + [LMainLibName]), Dependency `PackageName "str-sig"` (OrLaterVersion - `mkVersion [0,1,0,0]`)], + `mkVersion [0,1,0,0]`) + (Set.fromList + [LMainLibName])], virtualModules = []}, libExposed = True, libName = Nothing, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.format cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.format --- cabal-install-head-2.5+git20181017.1.a4578fc/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.format 2018-10-17 15:56:28.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/Cabal-2.5.0.0/tests/ParserTests/regressions/wl-pprint-indef.format 2018-11-27 22:49:58.000000000 +0000 @@ -1,6 +1,6 @@ -wl-pprint-indef.cabal:28:3: The field "mixins" is available since Cabal [2,0] -wl-pprint-indef.cabal:27:3: The field "signatures" is available since Cabal [2,0] -wl-pprint-indef.cabal:23:3: The field "mixins" is available since Cabal [2,0] +wl-pprint-indef.cabal:28:3: The field "mixins" is available only since the Cabal specification version 2.0. +wl-pprint-indef.cabal:27:3: The field "signatures" is available only since the Cabal specification version 2.0. +wl-pprint-indef.cabal:23:3: The field "mixins" is available only since the Cabal specification version 2.0. cabal-version: >=1.6 name: wl-pprint-indef version: 1.2 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/bootstrap.sh cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/bootstrap.sh --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/bootstrap.sh 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/bootstrap.sh 2018-11-27 22:50:01.000000000 +0000 @@ -137,6 +137,9 @@ "--no-doc") NO_DOCUMENTATION=1 shift;; + "--no-install") + NO_INSTALL=1 + shift;; "-j"|"--jobs") shift # check if there is another argument which doesn't start with - or -- @@ -276,6 +279,7 @@ echo "Checking installed packages for ghc-${GHC_VER}..." ${GHC_PKG} list --global ${SCOPE_OF_INSTALLATION} > ghc-pkg.list || die "running '${GHC_PKG} list' failed" +trap "rm ghc-pkg.list" EXIT # Will we need to install this package, or is a suitable version installed? need_pkg () { @@ -297,11 +301,14 @@ if need_pkg ${PKG} ${VER_MATCH} then - if [ -r "${PKG}-${VER}.tar.gz" ] + if [ -d "${PKG}-${VER}" ] + then + echo "${PKG}-${VER} will be installed from local directory." + elif [ -r "${PKG}-${VER}.tar.gz" ] then - echo "${PKG}-${VER} will be installed from local tarball." + echo "${PKG}-${VER} will be installed from local tarball." else - echo "${PKG}-${VER} will be downloaded and installed." + echo "${PKG}-${VER} will be downloaded and installed." fi else echo "${PKG} is already installed and the version is ok." @@ -348,6 +355,8 @@ } install_pkg () { + [ ${NO_INSTALL} ] && return 0 + PKG=$1 VER=$2 @@ -397,14 +406,19 @@ if need_pkg ${PKG} ${VER_MATCH} then echo - if [ -r "${PKG}-${VER}.tar.gz" ] + if [ -d "${PKG}-${VER}" ] then - echo "Using local tarball for ${PKG}-${VER}." + echo "Using local directory for ${PKG}-${VER}." else + if [ -r "${PKG}-${VER}.tar.gz" ] + then + echo "Using local tarball for ${PKG}-${VER}." + else echo "Downloading ${PKG}-${VER}..." fetch_pkg ${PKG} ${VER} + fi + unpack_pkg "${PKG}" "${VER}" fi - unpack_pkg "${PKG}" "${VER}" (cd "${PKG}-${VER}" && install_pkg ${PKG} ${VER}) fi } @@ -501,6 +515,7 @@ install_pkg "cabal-install" +[ ${NO_INSTALL} ] && exit 0 # Use the newly built cabal to turn the prefix/package database into a # legit cabal sandbox. This works because 'cabal sandbox init' will @@ -532,5 +547,3 @@ echo "$CABAL_BIN/" fi echo - -rm ghc-pkg.list diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/cabal-install.cabal cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/cabal-install.cabal --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/cabal-install.cabal 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/cabal-install.cabal 2018-11-27 22:50:01.000000000 +0000 @@ -243,6 +243,7 @@ Distribution.Client.Utils Distribution.Client.Utils.Assertion Distribution.Client.Utils.Json + Distribution.Client.Utils.Parsec Distribution.Client.VCS Distribution.Client.Win32SelfUpgrade Distribution.Client.World @@ -315,7 +316,7 @@ HTTP >= 4000.1.5 && < 4000.4, mtl >= 2.0 && < 3, network-uri >= 2.6.0.2 && < 2.7, - network >= 2.6 && < 2.8, + network >= 2.6 && < 2.9, pretty >= 1.1 && < 1.2, process >= 1.1.0.2 && < 1.7, random >= 1 && < 1.2, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/changelog cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/changelog --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/changelog 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/changelog 2018-11-27 22:50:01.000000000 +0000 @@ -2,15 +2,39 @@ 2.6.0.0 (current development version) * New solver flag: '--reject-unconstrained-dependencies'. (#2568) - * "cabal new-repl" now works for indefinite (in the Backpack sense) components. + * Ported old-style test options to the new-style commands (#5455). + * Improved error messages for cabal file parse errors. (#5710) -2.4.0.1 +2.4.1.0 Mikhail Glushenkov November 2018 + * Add message to alert user to potential package casing errors. (#5635) + * new-clean no longer deletes dist-newstyle/src with `-s`. (#5699) + * 'new-install' now warns when failing to symlink an exe (#5602) + * Extend 'cabal init' support for 'cabal-version' selection (#5567) * 'new-sdist' now generates tarballs with file modification times from a date in 2001. Using the Unix epoch caused problems on Windows. (#5596) + * Register monolithic packages installed into the store due to a + build-tool dependency if they also happen to contain a buildable + public lib. (#5379,#5604) + * Fixed a Windows bug where cabal-install tried to copy files + after moving them (#5631). + * 'cabal v2-repl' now works for indefinite (in the Backpack sense) components. (#5619) + * Set data dir environment variable for tarballs and remote repos (#5469) + * Fix monolithic inplace build tool PATH (#5633) + * 'cabal init' now supports '-w'/'--with-compiler' flag (#4936, #5654) + * Fix ambiguous --builddir on new-install (#5652) + * Allow relative --storedir (#5662) + * Respect --dry on new-install (#5671) + * Warn when new-installing zero exes (#5666) + * Add 'pkg-cabal-sha256' field to plan.json (#5695) + * New v2-build flag: '--only-configure'. (#5578) + * Fixed a 'new-install' failure that manifested when it + encountered remote source dependencies in a project. (#5643) + * New 'v2-[build,configure' flag: '--write-ghc-environment-files' + to control the generation of .ghc.environment files. (#5711) 2.4.0.0 Mikhail Glushenkov September 2018 - * Bugfix: "cabal new-build --ghc-option '--bogus' --ghc-option '-O1'" + * Bugfix: "cabal new-build --ghc-option '--bogus' --ghc-option '-O1'" no longer ignores all arguments except the last one (#5512). * Add the following option aliases for '-dir'-suffixed options: 'storedir', 'logsdir', 'packagedir', 'sourcedir', 'outputdir' (#5484). @@ -59,6 +83,9 @@ * Default changelog generated by 'cabal init' is now named 'CHANGELOG.md' (#5441). * Align output of 'new-build' command phases (#4040). + * Add suport for specifying remote VCS dependencies via new + 'source-repository-package' stanzas in 'cabal.project' files + (#5351). 2.2.0.0 Mikhail Glushenkov March 2018 * '--with-PROG' and '--PROG-options' are applied to all packages @@ -126,8 +153,8 @@ * Paths_ autogen modules now compile when `RebindableSyntax` or `OverloadedStrings` is used in `default-extensions`. [stack#3789](https://github.com/commercialhaskell/stack/issues/3789) - * getDataDir` and other `Paths_autogen` functions now work correctly - when compiling a custom `Setup.hs` script using `new-build` (#5164). + * getDataDir` and other `Paths_autogen` functions now work correctly + when compiling a custom `Setup.hs` script using `new-build` (#5164). 2.0.0.1 Mikhail Glushenkov December 2017 * Support for GHC's numeric -g debug levels (#4673). diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Check.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Check.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Check.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Check.hs 2018-11-27 22:50:00.000000000 +0000 @@ -16,9 +16,11 @@ check ) where + import Distribution.Client.Compat.Prelude import Prelude () +import Distribution.Client.Utils.Parsec (renderParseError) import Distribution.PackageDescription (GenericPackageDescription) import Distribution.PackageDescription.Check import Distribution.PackageDescription.Configuration (flattenPackageDescription) @@ -42,7 +44,7 @@ case result of Left (_, errors) -> do traverse_ (warn verbosity . showPError fpath) errors - die' verbosity $ "Failed parsing \"" ++ fpath ++ "\"." + die' verbosity $ renderParseError fpath bs errors warnings Right x -> return (warnings, x) -- | Note: must be called with the CWD set to the directory containing diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdBench.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdBench.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdBench.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdBench.hs 2018-11-27 22:50:00.000000000 +0000 @@ -20,7 +20,7 @@ ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) import qualified Distribution.Client.Setup as Client import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags, fromFlagOrDefault ) import Distribution.Simple.Command ( CommandUI(..), usageAlternatives ) import Distribution.Text @@ -33,7 +33,7 @@ import Control.Monad (when) -benchCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +benchCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) benchCommand = Client.installCommand { commandName = "new-bench", commandSynopsis = "Run benchmarks", @@ -73,9 +73,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -benchAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +benchAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -benchAction (configFlags, configExFlags, installFlags, haddockFlags) +benchAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) targetStrings globalFlags = do baseCtx <- establishProjectBaseContext verbosity cliConfig @@ -117,7 +117,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags -- | This defines what a 'TargetSelector' means for the @bench@ command. -- It selects the 'AvailableTarget's that the 'TargetSelector' refers to, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdBuild.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdBuild.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdBuild.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdBuild.hs 2018-11-27 22:50:00.000000000 +0000 @@ -14,13 +14,16 @@ import Distribution.Client.ProjectOrchestration import Distribution.Client.CmdErrorMessages +import Distribution.Compat.Semigroup ((<>)) import Distribution.Client.Setup - ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) + ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags + , liftOptions, yesNoOpt ) import qualified Distribution.Client.Setup as Client import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags + , Flag(..), toFlag, fromFlag, fromFlagOrDefault ) import Distribution.Simple.Command - ( CommandUI(..), usageAlternatives ) + ( CommandUI(..), usageAlternatives, option ) import Distribution.Verbosity ( Verbosity, normal ) import Distribution.Simple.Utils @@ -29,8 +32,11 @@ import qualified Data.Map as Map -buildCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) -buildCommand = Client.installCommand { +buildCommand :: + CommandUI + (BuildFlags, ( ConfigFlags, ConfigExFlags + , InstallFlags, HaddockFlags, TestFlags)) +buildCommand = CommandUI { commandName = "new-build", commandSynopsis = "Compile targets within the project.", commandUsage = usageAlternatives "new-build" [ "[TARGETS] [FLAGS]" ], @@ -49,7 +55,8 @@ commandNotes = Just $ \pname -> "Examples:\n" ++ " " ++ pname ++ " new-build\n" - ++ " Build the package in the current directory or all packages in the project\n" + ++ " Build the package in the current directory " + ++ "or all packages in the project\n" ++ " " ++ pname ++ " new-build pkgname\n" ++ " Build the package named pkgname in the project\n" ++ " " ++ pname ++ " new-build ./pkgfoo\n" @@ -57,11 +64,35 @@ ++ " " ++ pname ++ " new-build cname\n" ++ " Build the component named cname in the project\n" ++ " " ++ pname ++ " new-build cname --enable-profiling\n" - ++ " Build the component in profiling mode (including dependencies as needed)\n\n" + ++ " Build the component in profiling mode " + ++ "(including dependencies as needed)\n\n" - ++ cmdCommonHelpTextNewBuildBeta - } + ++ cmdCommonHelpTextNewBuildBeta, + commandDefaultFlags = + (defaultBuildFlags, commandDefaultFlags Client.installCommand), + commandOptions = \ showOrParseArgs -> + liftOptions snd setSnd + (commandOptions Client.installCommand showOrParseArgs) ++ + liftOptions fst setFst + [ option [] ["only-configure"] + "Instead of performing a full build just run the configure step" + buildOnlyConfigure (\v flags -> flags { buildOnlyConfigure = v }) + (yesNoOpt showOrParseArgs) + ] + } + where + setFst a (_,b) = (a,b) + setSnd b (a,_) = (a,b) + +data BuildFlags = BuildFlags + { buildOnlyConfigure :: Flag Bool + } + +defaultBuildFlags :: BuildFlags +defaultBuildFlags = BuildFlags + { buildOnlyConfigure = toFlag False + } -- | The @build@ command does a lot. It brings the install plan up to date, -- selects that part of the plan needed by the given or implicit targets and @@ -70,15 +101,26 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -buildAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) - -> [String] -> GlobalFlags -> IO () -buildAction (configFlags, configExFlags, installFlags, haddockFlags) +buildAction :: + ( BuildFlags + , (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags)) + -> [String] -> GlobalFlags -> IO () +buildAction + ( buildFlags + , (configFlags, configExFlags, installFlags, haddockFlags, testFlags)) targetStrings globalFlags = do + -- TODO: This flags defaults business is ugly + let onlyConfigure = fromFlag (buildOnlyConfigure defaultBuildFlags + <> buildOnlyConfigure buildFlags) + targetAction + | onlyConfigure = TargetActionConfigure + | otherwise = TargetActionBuild baseCtx <- establishProjectBaseContext verbosity cliConfig - targetSelectors <- either (reportTargetSelectorProblems verbosity) return - =<< readTargetSelectors (localPackages baseCtx) Nothing targetStrings + targetSelectors <- + either (reportTargetSelectorProblems verbosity) return + =<< readTargetSelectors (localPackages baseCtx) Nothing targetStrings buildCtx <- runProjectPreBuildPhase verbosity baseCtx $ \elaboratedPlan -> do @@ -95,7 +137,7 @@ targetSelectors let elaboratedPlan' = pruneInstallPlanToTargets - TargetActionBuild + targetAction targets elaboratedPlan elaboratedPlan'' <- @@ -115,14 +157,15 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags -- | This defines what a 'TargetSelector' means for the @bench@ command. -- It selects the 'AvailableTarget's that the 'TargetSelector' refers to, -- or otherwise classifies the problem. -- --- For the @build@ command select all components except non-buildable and disabled --- tests\/benchmarks, fail if there are no such components +-- For the @build@ command select all components except non-buildable +-- and disabled tests\/benchmarks, fail if there are no such +-- components -- selectPackageTargets :: TargetSelector -> [AvailableTarget k] -> Either TargetProblem [k] @@ -192,4 +235,3 @@ reportCannotPruneDependencies :: Verbosity -> CannotPruneDependencies -> IO a reportCannotPruneDependencies verbosity = die' verbosity . renderCannotPruneDependencies - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdClean.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdClean.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdClean.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdClean.hs 2018-11-27 22:50:00.000000000 +0000 @@ -22,46 +22,52 @@ import Distribution.Verbosity ( Verbosity, normal ) +import Control.Monad + ( mapM_ ) import Control.Exception ( throwIO ) import System.Directory - ( removeDirectoryRecursive, doesDirectoryExist ) + ( removeDirectoryRecursive, removeFile + , doesDirectoryExist, getDirectoryContents ) +import System.FilePath + ( () ) data CleanFlags = CleanFlags - { cleanSaveConfig :: Flag Bool - , cleanVerbosity :: Flag Verbosity - , cleanDistDir :: Flag FilePath + { cleanSaveConfig :: Flag Bool + , cleanVerbosity :: Flag Verbosity + , cleanDistDir :: Flag FilePath , cleanProjectFile :: Flag FilePath } deriving (Eq) defaultCleanFlags :: CleanFlags defaultCleanFlags = CleanFlags - { cleanSaveConfig = toFlag False - , cleanVerbosity = toFlag normal - , cleanDistDir = NoFlag + { cleanSaveConfig = toFlag False + , cleanVerbosity = toFlag normal + , cleanDistDir = NoFlag , cleanProjectFile = mempty } cleanCommand :: CommandUI CleanFlags cleanCommand = CommandUI - { commandName = "new-clean" - , commandSynopsis = "Clean the package store and remove temporary files." - , commandUsage = \pname -> + { commandName = "new-clean" + , commandSynopsis = "Clean the package store and remove temporary files." + , commandUsage = \pname -> "Usage: " ++ pname ++ " new-clean [FLAGS]\n" , commandDescription = Just $ \_ -> wrapText $ "Removes all temporary files created during the building process " ++ "(.hi, .o, preprocessed sources, etc.) and also empties out the " ++ "local caches (by default).\n\n" - , commandNotes = Nothing + , commandNotes = Nothing , commandDefaultFlags = defaultCleanFlags - , commandOptions = \showOrParseArgs -> + , commandOptions = \showOrParseArgs -> [ optionVerbosity cleanVerbosity (\v flags -> flags { cleanVerbosity = v }) , optionDistPref cleanDistDir (\dd flags -> flags { cleanDistDir = dd }) showOrParseArgs , option [] ["project-file"] - "Set the name of the cabal.project file to search for in parent directories" + ("Set the name of the cabal.project file" + ++ " to search for in parent directories") cleanProjectFile (\pf flags -> flags {cleanProjectFile = pf}) (reqArg "FILE" (succeedReadE Flag) flagToList) , option ['s'] ["save-config"] @@ -73,13 +79,14 @@ cleanAction :: CleanFlags -> [String] -> GlobalFlags -> IO () cleanAction CleanFlags{..} extraArgs _ = do - let verbosity = fromFlagOrDefault normal cleanVerbosity - saveConfig = fromFlagOrDefault False cleanSaveConfig + let verbosity = fromFlagOrDefault normal cleanVerbosity + saveConfig = fromFlagOrDefault False cleanSaveConfig mdistDirectory = flagToMaybe cleanDistDir - mprojectFile = flagToMaybe cleanProjectFile + mprojectFile = flagToMaybe cleanProjectFile unless (null extraArgs) $ - die' verbosity $ "'clean' doesn't take any extra arguments: " ++ unwords extraArgs + die' verbosity $ "'clean' doesn't take any extra arguments: " + ++ unwords extraArgs projectRoot <- either throwIO return =<< findProjectRoot Nothing mprojectFile @@ -88,20 +95,21 @@ if saveConfig then do let buildRoot = distBuildRootDirectory distLayout - unpackedSrcRoot = distUnpackedSrcRootDirectory distLayout buildRootExists <- doesDirectoryExist buildRoot - unpackedSrcRootExists <- doesDirectoryExist unpackedSrcRoot when buildRootExists $ do info verbosity ("Deleting build root (" ++ buildRoot ++ ")") handleDoesNotExist () $ removeDirectoryRecursive buildRoot - - when unpackedSrcRootExists $ do - info verbosity ("Deleting unpacked source root (" ++ unpackedSrcRoot ++ ")") - handleDoesNotExist () $ removeDirectoryRecursive unpackedSrcRoot else do let distRoot = distDirectory distLayout info verbosity ("Deleting dist-newstyle (" ++ distRoot ++ ")") handleDoesNotExist () $ removeDirectoryRecursive distRoot + + removeEnvFiles (distProjectRootDirectory distLayout) + +removeEnvFiles :: FilePath -> IO () +removeEnvFiles dir = + (mapM_ (removeFile . (dir )) . filter ((".ghc.environment" ==) . take 16)) + =<< getDirectoryContents dir diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdConfigure.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdConfigure.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdConfigure.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdConfigure.hs 2018-11-27 22:50:00.000000000 +0000 @@ -16,7 +16,7 @@ import Distribution.Client.Setup ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags, fromFlagOrDefault ) import Distribution.Verbosity ( normal ) @@ -27,7 +27,7 @@ import qualified Distribution.Client.Setup as Client configureCommand :: CommandUI (ConfigFlags, ConfigExFlags - ,InstallFlags, HaddockFlags) + ,InstallFlags, HaddockFlags, TestFlags) configureCommand = Client.installCommand { commandName = "new-configure", commandSynopsis = "Add extra project configuration", @@ -78,9 +78,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -configureAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +configureAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -configureAction (configFlags, configExFlags, installFlags, haddockFlags) +configureAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) _extraArgs globalFlags = do --TODO: deal with _extraArgs, since flags with wrong syntax end up there @@ -121,5 +121,5 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdErrorMessages.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdErrorMessages.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdErrorMessages.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdErrorMessages.hs 2018-11-27 22:50:00.000000000 +0000 @@ -15,6 +15,8 @@ ( packageId, PackageName, packageName ) import Distribution.Types.ComponentName ( showComponentName ) +import Distribution.Types.LibraryName + ( LibraryName(..) ) import Distribution.Solver.Types.OptionalStanza ( OptionalStanza(..) ) import Distribution.Text @@ -165,8 +167,8 @@ targetSelectorFilter TargetComponentUnknown{} = Nothing renderComponentName :: PackageName -> ComponentName -> String -renderComponentName pkgname CLibName = "library " ++ display pkgname -renderComponentName _ (CSubLibName name) = "library " ++ display name +renderComponentName pkgname (CLibName LMainLibName) = "library " ++ display pkgname +renderComponentName _ (CLibName (LSubLibName name)) = "library " ++ display name renderComponentName _ (CFLibName name) = "foreign library " ++ display name renderComponentName _ (CExeName name) = "executable " ++ display name renderComponentName _ (CTestName name) = "test suite " ++ display name diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdExec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdExec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdExec.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdExec.hs 2018-11-27 22:50:00.000000000 +0000 @@ -27,6 +27,7 @@ , GlobalFlags , InstallFlags ) +import qualified Distribution.Client.Setup as Client import Distribution.Client.ProjectOrchestration ( ProjectBuildContext(..) , runProjectPreBuildPhase @@ -73,6 +74,7 @@ , GhcImplInfo(supportsPkgEnvFiles) ) import Distribution.Simple.Setup ( HaddockFlags + , TestFlags , fromFlagOrDefault ) import Distribution.Simple.Utils @@ -86,8 +88,6 @@ , normal ) -import qualified Distribution.Client.CmdBuild as CmdBuild - import Prelude () import Distribution.Client.Compat.Prelude @@ -95,7 +95,7 @@ import qualified Data.Set as S import qualified Data.Map as M -execCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +execCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) execCommand = CommandUI { commandName = "new-exec" , commandSynopsis = "Give a command access to the store." @@ -116,13 +116,13 @@ ++ " to choose an appropriate version of ghc and to include any" ++ " ghc-specific flags requested." , commandNotes = Nothing - , commandOptions = commandOptions CmdBuild.buildCommand - , commandDefaultFlags = commandDefaultFlags CmdBuild.buildCommand + , commandOptions = commandOptions Client.installCommand + , commandDefaultFlags = commandDefaultFlags Client.installCommand } -execAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +execAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -execAction (configFlags, configExFlags, installFlags, haddockFlags) +execAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) extraArgs globalFlags = do baseCtx <- establishProjectBaseContext verbosity cliConfig @@ -194,7 +194,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags withOverrides env args program = program { programOverrideEnv = programOverrideEnv program ++ env , programDefaultArgs = programDefaultArgs program ++ args} diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdFreeze.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdFreeze.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdFreeze.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdFreeze.hs 2018-11-27 22:50:00.000000000 +0000 @@ -33,7 +33,7 @@ import Distribution.Client.Setup ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags, fromFlagOrDefault ) import Distribution.Simple.Utils ( die', notice, wrapText ) import Distribution.Verbosity @@ -49,7 +49,7 @@ import qualified Distribution.Client.Setup as Client -freezeCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +freezeCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) freezeCommand = Client.installCommand { commandName = "new-freeze", commandSynopsis = "Freeze dependencies.", @@ -99,9 +99,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -freezeAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +freezeAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -freezeAction (configFlags, configExFlags, installFlags, haddockFlags) +freezeAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) extraArgs globalFlags = do unless (null extraArgs) $ @@ -130,7 +130,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdHaddock.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdHaddock.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdHaddock.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdHaddock.hs 2018-11-27 22:50:00.000000000 +0000 @@ -20,7 +20,7 @@ ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) import qualified Distribution.Client.Setup as Client import Distribution.Simple.Setup - ( HaddockFlags(..), fromFlagOrDefault ) + ( HaddockFlags(..), TestFlags, fromFlagOrDefault ) import Distribution.Simple.Command ( CommandUI(..), usageAlternatives ) import Distribution.Verbosity @@ -32,7 +32,7 @@ haddockCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags - ,HaddockFlags) + ,HaddockFlags, TestFlags) haddockCommand = Client.installCommand { commandName = "new-haddock", commandSynopsis = "Build Haddock documentation", @@ -69,9 +69,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -haddockAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +haddockAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -haddockAction (configFlags, configExFlags, installFlags, haddockFlags) +haddockAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) targetStrings globalFlags = do baseCtx <- establishProjectBaseContext verbosity cliConfig @@ -111,7 +111,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags -- | This defines what a 'TargetSelector' means for the @haddock@ command. -- It selects the 'AvailableTarget's that the 'TargetSelector' refers to, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdInstall.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdInstall.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdInstall.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdInstall.hs 2018-11-27 22:50:00.000000000 +0000 @@ -26,15 +26,16 @@ import Distribution.Client.CmdSdist import Distribution.Client.Setup - ( GlobalFlags(..), ConfigFlags(..), ConfigExFlags, InstallFlags - , configureExOptions, installOptions, liftOptions ) + ( GlobalFlags(..), ConfigFlags(..), ConfigExFlags, InstallFlags(..) + , configureExOptions, installOptions, testOptions, liftOptions ) import Distribution.Solver.Types.ConstraintSource ( ConstraintSource(..) ) import Distribution.Client.Types - ( PackageSpecifier(..), PackageLocation(..), UnresolvedSourcePackage ) + ( PackageSpecifier(..), PackageLocation(..), UnresolvedSourcePackage + , SourcePackageDb(..) ) import qualified Distribution.Client.InstallPlan as InstallPlan import Distribution.Package - ( Package(..), PackageName, mkPackageName ) + ( Package(..), PackageName, mkPackageName, unPackageName ) import Distribution.Types.PackageId ( PackageIdentifier(..) ) import Distribution.Client.ProjectConfig.Types @@ -50,8 +51,9 @@ ( ProgramSearchPathEntry(..) ) import Distribution.Client.Config ( getCabalDir ) -import Distribution.Simple.PackageIndex - ( InstalledPackageIndex, lookupPackageName, lookupUnitId ) +import qualified Distribution.Simple.PackageIndex as PI +import Distribution.Solver.Types.PackageIndex + ( lookupPackageName, searchByName ) import Distribution.Types.InstalledPackageInfo ( InstalledPackageInfo(..) ) import Distribution.Types.Version @@ -73,14 +75,14 @@ import Distribution.Client.RebuildMonad ( runRebuild ) import Distribution.Client.InstallSymlink - ( symlinkBinary ) + ( OverwritePolicy(..), symlinkBinary ) import Distribution.Simple.Setup - ( Flag(Flag), HaddockFlags, fromFlagOrDefault, flagToMaybe, toFlag - , trueArg, configureOptions, haddockOptions, flagToList ) + ( Flag(..), HaddockFlags, TestFlags, fromFlagOrDefault, flagToMaybe + , trueArg, configureOptions, haddockOptions, flagToList, toFlag ) import Distribution.Solver.Types.SourcePackage ( SourcePackage(..) ) import Distribution.ReadE - ( succeedReadE ) + ( ReadE(..), succeedReadE ) import Distribution.Simple.Command ( CommandUI(..), ShowOrParseArgs(..), OptionField(..) , option, usageAlternatives, reqArg ) @@ -131,12 +133,14 @@ data NewInstallFlags = NewInstallFlags { ninstInstallLibs :: Flag Bool , ninstEnvironmentPath :: Flag FilePath + , ninstOverwritePolicy :: Flag OverwritePolicy } defaultNewInstallFlags :: NewInstallFlags defaultNewInstallFlags = NewInstallFlags { ninstInstallLibs = toFlag False , ninstEnvironmentPath = mempty + , ninstOverwritePolicy = toFlag NeverOverwrite } newInstallOptions :: ShowOrParseArgs -> [OptionField NewInstallFlags] @@ -149,10 +153,25 @@ "Set the environment file that may be modified." ninstEnvironmentPath (\pf flags -> flags { ninstEnvironmentPath = pf }) (reqArg "ENV" (succeedReadE Flag) flagToList) + , option [] ["overwrite-policy"] + "How to handle already existing symlinks." + ninstOverwritePolicy (\v flags -> flags { ninstOverwritePolicy = v }) + $ reqArg + "always|never" + readOverwritePolicyFlag + showOverwritePolicyFlag ] + where + readOverwritePolicyFlag = ReadE $ \case + "always" -> Right $ Flag AlwaysOverwrite + "never" -> Right $ Flag NeverOverwrite + policy -> Left $ "'" <> policy <> "' isn't a valid overwrite policy" + showOverwritePolicyFlag (Flag AlwaysOverwrite) = ["always"] + showOverwritePolicyFlag (Flag NeverOverwrite) = ["never"] + showOverwritePolicyFlag NoFlag = [] installCommand :: CommandUI ( ConfigFlags, ConfigExFlags, InstallFlags - , HaddockFlags, NewInstallFlags + , HaddockFlags, TestFlags, NewInstallFlags ) installCommand = CommandUI { commandName = "new-install" @@ -196,20 +215,22 @@ . optionName) $ installOptions showOrParseArgs) ++ liftOptions get4 set4 - -- hide "target-package-db" flag from the - -- install options. - (filter ((`notElem` ["v", "verbose"]) + -- hide "verbose" and "builddir" flags from the + -- haddock options. + (filter ((`notElem` ["v", "verbose", "builddir"]) . optionName) $ haddockOptions showOrParseArgs) - ++ liftOptions get5 set5 (newInstallOptions showOrParseArgs) - , commandDefaultFlags = (mempty, mempty, mempty, mempty, defaultNewInstallFlags) + ++ liftOptions get5 set5 (testOptions showOrParseArgs) + ++ liftOptions get6 set6 (newInstallOptions showOrParseArgs) + , commandDefaultFlags = (mempty, mempty, mempty, mempty, mempty, defaultNewInstallFlags) } where - get1 (a,_,_,_,_) = a; set1 a (_,b,c,d,e) = (a,b,c,d,e) - get2 (_,b,_,_,_) = b; set2 b (a,_,c,d,e) = (a,b,c,d,e) - get3 (_,_,c,_,_) = c; set3 c (a,b,_,d,e) = (a,b,c,d,e) - get4 (_,_,_,d,_) = d; set4 d (a,b,c,_,e) = (a,b,c,d,e) - get5 (_,_,_,_,e) = e; set5 e (a,b,c,d,_) = (a,b,c,d,e) + get1 (a,_,_,_,_,_) = a; set1 a (_,b,c,d,e,f) = (a,b,c,d,e,f) + get2 (_,b,_,_,_,_) = b; set2 b (a,_,c,d,e,f) = (a,b,c,d,e,f) + get3 (_,_,c,_,_,_) = c; set3 c (a,b,_,d,e,f) = (a,b,c,d,e,f) + get4 (_,_,_,d,_,_) = d; set4 d (a,b,c,_,e,f) = (a,b,c,d,e,f) + get5 (_,_,_,_,e,_) = e; set5 e (a,b,c,d,_,f) = (a,b,c,d,e,f) + get6 (_,_,_,_,_,f) = f; set6 f (a,b,c,d,e,_) = (a,b,c,d,e,f) -- | The @install@ command actually serves four different needs. It installs: @@ -229,9 +250,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -installAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, NewInstallFlags) +installAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags, NewInstallFlags) -> [String] -> GlobalFlags -> IO () -installAction (configFlags, configExFlags, installFlags, haddockFlags, newInstallFlags) +installAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags, newInstallFlags) targetStrings globalFlags = do -- We never try to build tests/benchmarks for remote packages. -- So we set them as disabled by default and error if they are explicitly @@ -291,6 +312,18 @@ TargetProblemCommon (TargetAvailableInIndex name) -> Right name err -> Left err + -- report incorrect case for known package. + for_ errs' $ \case + TargetProblemCommon (TargetNotInProject hn) -> + case searchByName (packageIndex pkgDb) (unPackageName hn) of + [] -> return () + xs -> die' verbosity . concat $ + [ "Unknown package \"", unPackageName hn, "\". " + , "Did you mean any of the following?\n" + , unlines (("- " ++) . unPackageName . fst <$> xs) + ] + _ -> return () + when (not . null $ errs') $ reportTargetProblems verbosity errs' let @@ -358,6 +391,42 @@ | Just (pkg :: PackageId) <- simpleParse pkgName = return pkg | otherwise = die' verbosity ("Invalid package ID: " ++ pkgName) packageIds <- mapM parsePkg targetStrings + + cabalDir <- getCabalDir + let + projectConfig = globalConfig <> cliConfig + + ProjectConfigBuildOnly { + projectConfigLogsDir + } = projectConfigBuildOnly projectConfig + + ProjectConfigShared { + projectConfigStoreDir + } = projectConfigShared projectConfig + + mlogsDir = flagToMaybe projectConfigLogsDir + mstoreDir = flagToMaybe projectConfigStoreDir + cabalDirLayout = mkCabalDirLayout cabalDir mstoreDir mlogsDir + + buildSettings = resolveBuildTimeSettings + verbosity cabalDirLayout + projectConfig + + SourcePackageDb { packageIndex } <- projectConfigWithBuilderRepoContext + verbosity buildSettings + (getSourcePackages verbosity) + + for_ targetStrings $ \case + name + | null (lookupPackageName packageIndex (mkPackageName name)) + , xs@(_:_) <- searchByName packageIndex name -> + die' verbosity . concat $ + [ "Unknown package \"", name, "\". " + , "Did you mean any of the following?\n" + , unlines (("- " ++) . unPackageName . fst <$> xs) + ] + _ -> return () + let packageSpecifiers = flip fmap packageIds $ \case PackageIdentifier{..} @@ -365,7 +434,7 @@ | otherwise -> NamedPackage pkgName [PackagePropertyVersion (thisVersion pkgVersion)] packageTargets = flip TargetPackageNamed Nothing . pkgName <$> packageIds - return (packageSpecifiers, packageTargets, globalConfig <> cliConfig) + return (packageSpecifiers, packageTargets, projectConfig) (specs, selectors, config) <- withProjectOrGlobalConfig verbosity globalConfigFlag withProject withoutProject @@ -439,9 +508,9 @@ " is unparsable. Libraries cannot be installed.") >> return [] else return [] - cabalDir <- getCabalDir + cabalDir <- getCabalDir + mstoreDir <- sequenceA $ makeAbsolute <$> flagToMaybe (globalStoreDir globalFlags) let - mstoreDir = flagToMaybe (globalStoreDir globalFlags) mlogsDir = flagToMaybe (globalLogsDir globalFlags) cabalLayout = mkCabalDirLayout cabalDir mstoreDir mlogsDir packageDbs = storePackageDBStack (cabalStoreDirLayout cabalLayout) compilerId @@ -494,15 +563,17 @@ printPlan verbosity baseCtx buildCtx buildOutcomes <- runProjectBuildPhase verbosity baseCtx buildCtx + runProjectPostBuildPhase verbosity baseCtx buildCtx buildOutcomes let + dryRun = buildSettingDryRun $ buildSettings baseCtx mkPkgBinDir = ( "bin") . storePackageDirectory (cabalStoreDirLayout $ cabalDirLayout baseCtx) compilerId installLibs = fromFlagOrDefault False (ninstInstallLibs newInstallFlags) - when (not installLibs) $ do + when (not installLibs && not dryRun) $ do -- If there are exes, symlink them let symlinkBindirUnknown = "symlink-bindir is not defined. Set it in your cabal config file " @@ -513,11 +584,15 @@ $ projectConfigBuildOnly $ projectConfig $ baseCtx createDirectoryIfMissingVerbose verbosity False symlinkBindir - traverse_ (symlinkBuiltPackage verbosity mkPkgBinDir symlinkBindir) - $ Map.toList $ targetsMap buildCtx - runProjectPostBuildPhase verbosity baseCtx buildCtx buildOutcomes + warnIfNoExes verbosity buildCtx + let + doSymlink = symlinkBuiltPackage + verbosity + overwritePolicy + mkPkgBinDir symlinkBindir + in traverse_ doSymlink $ Map.toList $ targetsMap buildCtx - when installLibs $ + when (installLibs && not dryRun) $ if supportsPkgEnvFiles then do -- Why do we get it again? If we updated a globalPackage then we need @@ -525,7 +600,7 @@ installedIndex' <- getInstalledPackages verbosity compiler packageDbs progDb' let getLatest = fmap (head . snd) . take 1 . sortBy (comparing (Down . fst)) - . lookupPackageName installedIndex' + . PI.lookupPackageName installedIndex' globalLatest = concat (getLatest <$> globalPackages) baseEntries = @@ -548,8 +623,27 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags') cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags' configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig) + overwritePolicy = fromFlagOrDefault NeverOverwrite + $ ninstOverwritePolicy newInstallFlags + +warnIfNoExes :: Verbosity -> ProjectBuildContext -> IO () +warnIfNoExes verbosity buildCtx = + when noExes $ + warn verbosity $ "You asked to install executables, " + <> "but there are no executables in " + <> plural (listPlural selectors) "target" "targets" <> ": " + <> intercalate ", " (showTargetSelector <$> selectors) <> ". " + <> "Perhaps you want to use --lib " + <> "to install libraries instead." + where + targets = concat $ Map.elems $ targetsMap buildCtx + components = fst <$> targets + selectors = concatMap snd targets + noExes = null $ catMaybes $ exeMaybe <$> components + exeMaybe (ComponentTarget (CExeName exe) _) = Just exe + exeMaybe _ = Nothing globalPackages :: [PackageName] globalPackages = mkPackageName <$> @@ -560,12 +654,12 @@ , "bin-package-db" ] -environmentFileToSpecifiers :: InstalledPackageIndex -> [GhcEnvironmentFileEntry] +environmentFileToSpecifiers :: PI.InstalledPackageIndex -> [GhcEnvironmentFileEntry] -> ([PackageSpecifier a], [GhcEnvironmentFileEntry]) environmentFileToSpecifiers ipi = foldMap $ \case (GhcEnvFilePackageId unitId) | Just InstalledPackageInfo{ sourcePackageId = PackageIdentifier{..}, installedUnitId } - <- lookupUnitId ipi unitId + <- PI.lookupUnitId ipi unitId , let pkgSpec = NamedPackage pkgName [PackagePropertyVersion (thisVersion pkgVersion)] -> if pkgName `elem` globalPackages then ([pkgSpec], []) @@ -581,29 +675,43 @@ -- | Symlink every exe from a package from the store to a given location symlinkBuiltPackage :: Verbosity + -> OverwritePolicy -- ^ Whether to overwrite existing files -> (UnitId -> FilePath) -- ^ A function to get an UnitId's -- store directory -> FilePath -- ^ Where to put the symlink -> ( UnitId , [(ComponentTarget, [TargetSelector])] ) -> IO () -symlinkBuiltPackage verbosity mkSourceBinDir destDir (pkg, components) = +symlinkBuiltPackage verbosity overwritePolicy + mkSourceBinDir destDir + (pkg, components) = traverse_ symlinkAndWarn exes where exes = catMaybes $ (exeMaybe . fst) <$> components exeMaybe (ComponentTarget (CExeName exe) _) = Just exe exeMaybe _ = Nothing symlinkAndWarn exe = do - success <- symlinkBuiltExe verbosity (mkSourceBinDir pkg) destDir exe - unless success $ warn verbosity $ "Symlink for " - <> prettyShow exe - <> " already exists. Not overwriting." + success <- symlinkBuiltExe + verbosity overwritePolicy + (mkSourceBinDir pkg) destDir exe + let errorMessage = case overwritePolicy of + NeverOverwrite -> + "Path '" <> (destDir prettyShow exe) <> "' already exists. " + <> "Use --overwrite-policy=always to overwrite." + -- This shouldn't even be possible, but we keep it in case + -- symlinking logic changes + AlwaysOverwrite -> "Symlinking '" <> prettyShow exe <> "' failed." + unless success $ die' verbosity errorMessage -- | Symlink a specific exe. -symlinkBuiltExe :: Verbosity -> FilePath -> FilePath -> UnqualComponentName -> IO Bool -symlinkBuiltExe verbosity sourceDir destDir exe = do - notice verbosity $ "Symlinking " ++ prettyShow exe +symlinkBuiltExe :: Verbosity -> OverwritePolicy + -> FilePath -> FilePath + -> UnqualComponentName + -> IO Bool +symlinkBuiltExe verbosity overwritePolicy sourceDir destDir exe = do + notice verbosity $ "Symlinking '" <> prettyShow exe <> "'" symlinkBinary + overwritePolicy destDir sourceDir exe @@ -614,10 +722,9 @@ entriesForLibraryComponents = Map.foldrWithKey' (\k v -> mappend (go k v)) [] where hasLib :: (ComponentTarget, [TargetSelector]) -> Bool - hasLib (ComponentTarget CLibName _, _) = True - hasLib (ComponentTarget (CSubLibName _) _, _) = True - hasLib _ = False - + hasLib (ComponentTarget (CLibName _) _, _) = True + hasLib _ = False + go :: UnitId -> [(ComponentTarget, [TargetSelector])] -> [GhcEnvironmentFileEntry] go unitId targets | any hasLib targets = [GhcEnvFilePackageId unitId] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdLegacy.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdLegacy.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdLegacy.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdLegacy.hs 2018-11-27 22:50:00.000000000 +0000 @@ -73,6 +73,9 @@ instance (HasVerbosity a) => HasVerbosity (a, b, c, d) where verbosity (a, _, _, _) = verbosity a +instance (HasVerbosity a) => HasVerbosity (a, b, c, d, e) where + verbosity (a, _, _, _, _) = verbosity a + instance HasVerbosity Setup.BuildFlags where verbosity = verbosity . Setup.buildVerbosity diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdRepl.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdRepl.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdRepl.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdRepl.hs 2018-11-27 22:50:00.000000000 +0000 @@ -45,7 +45,7 @@ import Distribution.Client.Types ( PackageLocation(..), PackageSpecifier(..), UnresolvedSourcePackage ) import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault, replOptions + ( HaddockFlags, TestFlags, fromFlagOrDefault, replOptions , Flag(..), toFlag, trueArg, falseArg ) import Distribution.Simple.Command ( CommandUI(..), liftOption, usageAlternatives, option @@ -72,6 +72,8 @@ ( Dependency(..) ) import Distribution.Types.GenericPackageDescription ( emptyGenericPackageDescription ) +import Distribution.Types.LibraryName + ( LibraryName(..) ) import Distribution.Types.PackageDescription ( PackageDescription(..), emptyPackageDescription ) import Distribution.Types.Library @@ -138,7 +140,7 @@ ("couldn't parse dependency: " ++) parsec -replCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, ReplFlags, EnvFlags) +replCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags, ReplFlags, EnvFlags) replCommand = Client.installCommand { commandName = "new-repl", commandSynopsis = "Open an interactive session for the given component.", @@ -176,27 +178,27 @@ ++ "to the default component (or no component if there is no project present)\n" ++ cmdCommonHelpTextNewBuildBeta, - commandDefaultFlags = (configFlags,configExFlags,installFlags,haddockFlags,[],defaultEnvFlags), + commandDefaultFlags = (configFlags,configExFlags,installFlags,haddockFlags,testFlags,[],defaultEnvFlags), commandOptions = \showOrParseArgs -> map liftOriginal (commandOptions Client.installCommand showOrParseArgs) ++ map liftReplOpts (replOptions showOrParseArgs) ++ map liftEnvOpts (envOptions showOrParseArgs) } where - (configFlags,configExFlags,installFlags,haddockFlags) = commandDefaultFlags Client.installCommand + (configFlags,configExFlags,installFlags,haddockFlags,testFlags) = commandDefaultFlags Client.installCommand liftOriginal = liftOption projectOriginal updateOriginal liftReplOpts = liftOption projectReplOpts updateReplOpts liftEnvOpts = liftOption projectEnvOpts updateEnvOpts - projectOriginal (a,b,c,d,_,_) = (a,b,c,d) - updateOriginal (a,b,c,d) (_,_,_,_,e,f) = (a,b,c,d,e,f) + projectOriginal (a,b,c,d,e,_,_) = (a,b,c,d,e) + updateOriginal (a,b,c,d,e) (_,_,_,_,_,f,g) = (a,b,c,d,e,f,g) - projectReplOpts (_,_,_,_,e,_) = e - updateReplOpts e (a,b,c,d,_,f) = (a,b,c,d,e,f) + projectReplOpts (_,_,_,_,_,f,_) = f + updateReplOpts f (a,b,c,d,e,_,g) = (a,b,c,d,e,f,g) - projectEnvOpts (_,_,_,_,_,f) = f - updateEnvOpts f (a,b,c,d,e,_) = (a,b,c,d,e,f) + projectEnvOpts (_,_,_,_,_,_,g) = g + updateEnvOpts g (a,b,c,d,e,f,_) = (a,b,c,d,e,f,g) -- | The @repl@ command is very much like @build@. It brings the install plan -- up to date, selects that part of the plan needed by the given or implicit @@ -209,9 +211,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -replAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, ReplFlags, EnvFlags) +replAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags, ReplFlags, EnvFlags) -> [String] -> GlobalFlags -> IO () -replAction (configFlags, configExFlags, installFlags, haddockFlags, replFlags, envFlags) +replAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags, replFlags, envFlags) targetStrings globalFlags = do let ignoreProject = fromFlagOrDefault False (envIgnoreProject envFlags) @@ -302,7 +304,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig) validatedTargets elaboratedPlan targetSelectors = do @@ -370,7 +372,7 @@ { targetBuildDepends = [baseDep] , defaultLanguage = Just Haskell2010 } - baseDep = Dependency "base" anyVersion + baseDep = Dependency "base" anyVersion (Set.singleton LMainLibName) pkgId = PackageIdentifier "fake-package" version0 writeGenericPackageDescription (tempDir "fake-package.cabal") genericPackageDescription diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdRun.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdRun.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdRun.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdRun.hs 2018-11-27 22:50:00.000000000 +0000 @@ -29,7 +29,7 @@ ( defaultGlobalFlags ) import qualified Distribution.Client.Setup as Client import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags, fromFlagOrDefault ) import Distribution.Simple.Command ( CommandUI(..), usageAlternatives ) import Distribution.Types.ComponentName @@ -108,7 +108,8 @@ import System.FilePath ( () ) -runCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) + +runCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) runCommand = Client.installCommand { commandName = "new-run", commandSynopsis = "Run an executable.", @@ -154,9 +155,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -runAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +runAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -runAction (configFlags, configExFlags, installFlags, haddockFlags) +runAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) targetStrings globalFlags = do globalTmp <- getTemporaryDirectory tempDir <- createTempDirectory globalTmp "cabal-repl." @@ -296,7 +297,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig) handleShebang :: String -> IO () diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdSdist.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdSdist.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdSdist.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdSdist.hs 2018-11-27 22:50:00.000000000 +0000 @@ -1,10 +1,10 @@ -{-# LANGUAGE MultiWayIf #-} -{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE MultiWayIf #-} +{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE TupleSections #-} -{-# LANGUAGE ViewPatterns #-} -module Distribution.Client.CmdSdist +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE ViewPatterns #-} +module Distribution.Client.CmdSdist ( sdistCommand, sdistAction, packageToSdist , SdistFlags(..), defaultSdistFlags , OutputFormat(..), ArchiveFormat(..) ) where @@ -29,6 +29,9 @@ import Distribution.Client.ProjectConfig ( findProjectRoot, readProjectConfig ) +import Distribution.Compat.Semigroup + ((<>)) + import Distribution.Package ( Package(packageId) ) import Distribution.PackageDescription.Configuration @@ -113,7 +116,7 @@ "Separate the source files with NUL bytes rather than newlines." sdistNulSeparated (\v flags -> flags { sdistNulSeparated = v }) trueArg - , option [] ["archive-format"] + , option [] ["archive-format"] "Choose what type of archive to create. No effect if given with '--list-only'" sdistArchiveFormat (\v flags -> flags { sdistArchiveFormat = v }) (choiceOpt @@ -163,7 +166,7 @@ nulSeparated = fromFlagOrDefault False sdistNulSeparated archiveFormat = fromFlagOrDefault TargzFormat sdistArchiveFormat mOutputPath = flagToMaybe sdistOutputPath - + projectRoot <- either throwIO return =<< findProjectRoot Nothing mProjectFile let distLayout = defaultDistDirLayout projectRoot mDistDirectory dir <- getCurrentDirectory @@ -173,13 +176,13 @@ targetSelectors <- either (reportTargetSelectorProblems verbosity) return =<< readTargetSelectors localPkgs Nothing targetStrings - + mOutputPath' <- case mOutputPath of Just "-" -> return (Just "-") Just path -> Just <$> makeAbsolute path Nothing -> return Nothing - - let + + let format = if | listSources, nulSeparated -> SourceList '\0' | listSources -> SourceList '\n' @@ -189,7 +192,7 @@ SourceList _ -> "list" Archive TargzFormat -> "tar.gz" Archive ZipFormat -> "zip" - + outputPath pkg = case mOutputPath' of Just path | path == "-" -> "-" @@ -199,11 +202,11 @@ | otherwise -> distSdistFile distLayout (packageId pkg) archiveFormat createDirectoryIfMissing True (distSdistDirectory distLayout) - + case reifyTargetSelectors localPkgs targetSelectors of Left errs -> die' verbosity . unlines . fmap renderTargetProblem $ errs - Right pkgs - | length pkgs > 1, not listSources, Just "-" <- mOutputPath' -> + Right pkgs + | length pkgs > 1, not listSources, Just "-" <- mOutputPath' -> die' verbosity "Can't write multiple tarballs to standard output!" | otherwise -> mapM_ (\pkg -> packageToSdist verbosity (distProjectRootDirectory distLayout) format (outputPath pkg) pkg) pkgs @@ -217,89 +220,107 @@ packageToSdist :: Verbosity -> FilePath -> OutputFormat -> FilePath -> UnresolvedSourcePackage -> IO () packageToSdist verbosity projectRootDir format outputFile pkg = do - dir <- case packageSource pkg of - LocalUnpackedPackage path -> return path - _ -> die' verbosity "The impossible happened: a local package isn't local" - oldPwd <- getCurrentDirectory - setCurrentDirectory dir - - let norm flag = fmap ((flag, ) . normalise) - (norm NoExec -> nonexec, norm Exec -> exec) <- - listPackageSources verbosity (flattenPackageDescription $ packageDescription pkg) knownSuffixHandlers + let death = die' verbosity ("The impossible happened: a local package isn't local" <> (show pkg)) + dir0 <- case packageSource pkg of + LocalUnpackedPackage path -> pure (Right path) + RemoteSourceRepoPackage _ (Just path) -> pure (Right path) + RemoteSourceRepoPackage {} -> death + LocalTarballPackage tgz -> pure (Left tgz) + RemoteTarballPackage _ (Just tgz) -> pure (Left tgz) + RemoteTarballPackage {} -> death + RepoTarballPackage {} -> death let write = if outputFile == "-" then putStr . withOutputMarker verbosity . BSL.unpack else BSL.writeFile outputFile - files = nub . sortOn snd $ nonexec ++ exec - case format of - SourceList nulSep -> do - let prefix = makeRelative projectRootDir dir - write (BSL.pack . (++ [nulSep]) . intercalate [nulSep] . fmap ((prefix ) . snd) $ files) - when (outputFile /= "-") $ - notice verbosity $ "Wrote source list to " ++ outputFile ++ "\n" - Archive TargzFormat -> do - let entriesM :: StateT (Set.Set FilePath) (WriterT [Tar.Entry] IO) () - entriesM = do - let prefix = prettyShow (packageId pkg) - modify (Set.insert prefix) - case Tar.toTarPath True prefix of - Left err -> liftIO $ die' verbosity ("Error packing sdist: " ++ err) - Right path -> tell [Tar.directoryEntry path] - - forM_ files $ \(perm, file) -> do - let fileDir = takeDirectory (prefix file) - perm' = case perm of - Exec -> Tar.executableFilePermissions - NoExec -> Tar.ordinaryFilePermissions - needsEntry <- gets (Set.notMember fileDir) - - when needsEntry $ do - modify (Set.insert fileDir) - case Tar.toTarPath True fileDir of - Left err -> liftIO $ die' verbosity ("Error packing sdist: " ++ err) - Right path -> tell [Tar.directoryEntry path] - - contents <- liftIO . fmap BSL.fromStrict . BS.readFile $ file - case Tar.toTarPath False (prefix file) of - Left err -> liftIO $ die' verbosity ("Error packing sdist: " ++ err) - Right path -> tell [(Tar.fileEntry path contents) { Tar.entryPermissions = perm' }] - - entries <- execWriterT (evalStateT entriesM mempty) - let -- Pretend our GZip file is made on Unix. - normalize bs = BSL.concat [first, "\x03", rest'] - where - (first, rest) = BSL.splitAt 9 bs - rest' = BSL.tail rest - -- The Unix epoch, which is the default value, is - -- unsuitable because it causes unpacking problems on - -- Windows; we need a post-1980 date. One gigasecond - -- after the epoch is during 2001-09-09, so that does - -- nicely. See #5596. - setModTime entry = entry { Tar.entryTime = 1000000000 } - write . normalize . GZip.compress . Tar.write $ fmap setModTime entries + case dir0 of + Left tgz -> do + case format of + Archive TargzFormat -> do + write =<< BSL.readFile tgz when (outputFile /= "-") $ notice verbosity $ "Wrote tarball sdist to " ++ outputFile ++ "\n" - Archive ZipFormat -> do - let prefix = prettyShow (packageId pkg) - entries <- forM files $ \(perm, file) -> do - let perm' = case perm of - -- -rwxr-xr-x - Exec -> 0o010755 `shiftL` 16 - -- -rw-r--r-- - NoExec -> 0o010644 `shiftL` 16 - contents <- BSL.readFile file - return $ (Zip.toEntry (prefix file) 0 contents) { Zip.eExternalFileAttributes = perm' } - let archive = foldr Zip.addEntryToArchive Zip.emptyArchive entries - write (Zip.fromArchive archive) - when (outputFile /= "-") $ - notice verbosity $ "Wrote zip sdist to " ++ outputFile ++ "\n" - setCurrentDirectory oldPwd + _ -> die' verbosity ("cannot convert tarball package to " ++ show format) + + Right dir -> do + oldPwd <- getCurrentDirectory + setCurrentDirectory dir + + let norm flag = fmap ((flag, ) . normalise) + (norm NoExec -> nonexec, norm Exec -> exec) <- + listPackageSources verbosity (flattenPackageDescription $ packageDescription pkg) knownSuffixHandlers + + let files = nub . sortOn snd $ nonexec ++ exec + + case format of + SourceList nulSep -> do + let prefix = makeRelative projectRootDir dir + write (BSL.pack . (++ [nulSep]) . intercalate [nulSep] . fmap ((prefix ) . snd) $ files) + when (outputFile /= "-") $ + notice verbosity $ "Wrote source list to " ++ outputFile ++ "\n" + Archive TargzFormat -> do + let entriesM :: StateT (Set.Set FilePath) (WriterT [Tar.Entry] IO) () + entriesM = do + let prefix = prettyShow (packageId pkg) + modify (Set.insert prefix) + case Tar.toTarPath True prefix of + Left err -> liftIO $ die' verbosity ("Error packing sdist: " ++ err) + Right path -> tell [Tar.directoryEntry path] + + forM_ files $ \(perm, file) -> do + let fileDir = takeDirectory (prefix file) + perm' = case perm of + Exec -> Tar.executableFilePermissions + NoExec -> Tar.ordinaryFilePermissions + needsEntry <- gets (Set.notMember fileDir) + + when needsEntry $ do + modify (Set.insert fileDir) + case Tar.toTarPath True fileDir of + Left err -> liftIO $ die' verbosity ("Error packing sdist: " ++ err) + Right path -> tell [Tar.directoryEntry path] + + contents <- liftIO . fmap BSL.fromStrict . BS.readFile $ file + case Tar.toTarPath False (prefix file) of + Left err -> liftIO $ die' verbosity ("Error packing sdist: " ++ err) + Right path -> tell [(Tar.fileEntry path contents) { Tar.entryPermissions = perm' }] + + entries <- execWriterT (evalStateT entriesM mempty) + let -- Pretend our GZip file is made on Unix. + normalize bs = BSL.concat [first, "\x03", rest'] + where + (first, rest) = BSL.splitAt 9 bs + rest' = BSL.tail rest + -- The Unix epoch, which is the default value, is + -- unsuitable because it causes unpacking problems on + -- Windows; we need a post-1980 date. One gigasecond + -- after the epoch is during 2001-09-09, so that does + -- nicely. See #5596. + setModTime entry = entry { Tar.entryTime = 1000000000 } + write . normalize . GZip.compress . Tar.write $ fmap setModTime entries + when (outputFile /= "-") $ + notice verbosity $ "Wrote tarball sdist to " ++ outputFile ++ "\n" + Archive ZipFormat -> do + let prefix = prettyShow (packageId pkg) + entries <- forM files $ \(perm, file) -> do + let perm' = case perm of + -- -rwxr-xr-x + Exec -> 0o010755 `shiftL` 16 + -- -rw-r--r-- + NoExec -> 0o010644 `shiftL` 16 + contents <- BSL.readFile file + return $ (Zip.toEntry (prefix file) 0 contents) { Zip.eExternalFileAttributes = perm' } + let archive = foldr Zip.addEntryToArchive Zip.emptyArchive entries + write (Zip.fromArchive archive) + when (outputFile /= "-") $ + notice verbosity $ "Wrote zip sdist to " ++ outputFile ++ "\n" + setCurrentDirectory oldPwd -- reifyTargetSelectors :: [PackageSpecifier UnresolvedSourcePackage] -> [TargetSelector] -> Either [TargetProblem] [UnresolvedSourcePackage] -reifyTargetSelectors pkgs sels = +reifyTargetSelectors pkgs sels = case partitionEithers (foldMap go sels) of ([], sels') -> Right sels' (errs, _) -> Left errs @@ -311,7 +332,7 @@ getPkg pid = case find ((== pid) . packageId) pkgs' of Just pkg -> Right pkg Nothing -> error "The impossible happened: we have a reference to a local package that isn't in localPackages." - + go :: TargetSelector -> [Either TargetProblem UnresolvedSourcePackage] go (TargetPackage _ pids Nothing) = fmap getPkg pids go (TargetAllPackages Nothing) = Right <$> pkgs' @@ -338,4 +359,3 @@ renderTargetProblem (NonlocalPackageNotAllowed pname) = "The package " ++ unPackageName pname ++ " cannot be packaged for distribution, because it is not " ++ "local to this project." - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdTest.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdTest.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdTest.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdTest.hs 2018-11-27 22:50:00.000000000 +0000 @@ -17,10 +17,10 @@ import Distribution.Client.CmdErrorMessages import Distribution.Client.Setup - ( GlobalFlags, ConfigFlags(..), ConfigExFlags, InstallFlags ) + ( GlobalFlags(..), ConfigFlags(..), ConfigExFlags, InstallFlags ) import qualified Distribution.Client.Setup as Client import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags(..), fromFlagOrDefault ) import Distribution.Simple.Command ( CommandUI(..), usageAlternatives ) import Distribution.Text @@ -33,12 +33,12 @@ import Control.Monad (when) -testCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) -testCommand = Client.installCommand { - commandName = "new-test", - commandSynopsis = "Run test-suites", - commandUsage = usageAlternatives "new-test" [ "[TARGETS] [FLAGS]" ], - commandDescription = Just $ \_ -> wrapText $ +testCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) +testCommand = Client.installCommand + { commandName = "new-test" + , commandSynopsis = "Run test-suites" + , commandUsage = usageAlternatives "new-test" [ "[TARGETS] [FLAGS]" ] + , commandDescription = Just $ \_ -> wrapText $ "Runs the specified test-suites, first ensuring they are up to " ++ "date.\n\n" @@ -53,8 +53,8 @@ ++ "'cabal.project.local' and other files.\n\n" ++ "To pass command-line arguments to a test suite, see the " - ++ "new-run command.", - commandNotes = Just $ \pname -> + ++ "new-run command." + , commandNotes = Just $ \pname -> "Examples:\n" ++ " " ++ pname ++ " new-test\n" ++ " Run all the test-suites in the package in the current directory\n" @@ -66,7 +66,9 @@ ++ " Run the test-suite built with code coverage (including local libs used)\n\n" ++ cmdCommonHelpTextNewBuildBeta - } + + } + -- | The @test@ command is very much like @build@. It brings the install plan @@ -79,9 +81,9 @@ -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- -testAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +testAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -testAction (configFlags, configExFlags, installFlags, haddockFlags) +testAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) targetStrings globalFlags = do baseCtx <- establishProjectBaseContext verbosity cliConfig @@ -123,7 +125,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags -- | This defines what a 'TargetSelector' means for the @test@ command. -- It selects the 'AvailableTarget's that the 'TargetSelector' refers to, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdUpdate.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdUpdate.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/CmdUpdate.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/CmdUpdate.hs 2018-11-27 22:50:00.000000000 +0000 @@ -32,7 +32,7 @@ , UpdateFlags, defaultUpdateFlags , RepoContext(..) ) import Distribution.Simple.Setup - ( HaddockFlags, fromFlagOrDefault ) + ( HaddockFlags, TestFlags, fromFlagOrDefault ) import Distribution.Simple.Utils ( die', notice, wrapText, writeFileAtomic, noticeNoWrap ) import Distribution.Verbosity @@ -60,7 +60,7 @@ import qualified Hackage.Security.Client as Sec updateCommand :: CommandUI ( ConfigFlags, ConfigExFlags - , InstallFlags, HaddockFlags ) + , InstallFlags, HaddockFlags, TestFlags ) updateCommand = Client.installCommand { commandName = "new-update", commandSynopsis = "Updates list of known packages.", @@ -110,9 +110,9 @@ name <- ReadP.manyTill (ReadP.satisfy (\c -> c /= ',')) ReadP.eof return (UpdateRequest name IndexStateHead) -updateAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +updateAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> GlobalFlags -> IO () -updateAction (configFlags, configExFlags, installFlags, haddockFlags) +updateAction (configFlags, configExFlags, installFlags, haddockFlags, testFlags) extraArgs globalFlags = do projectConfig <- withProjectOrGlobalConfig verbosity globalConfigFlag (projectConfig <$> establishProjectBaseContext verbosity cliConfig) @@ -168,7 +168,7 @@ verbosity = fromFlagOrDefault normal (configVerbosity configFlags) cliConfig = commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags + installFlags haddockFlags testFlags globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig) updateRepo :: Verbosity -> UpdateFlags -> RepoContext -> (Repo, IndexState) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Config.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Config.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Config.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Config.hs 2018-11-27 22:50:00.000000000 +0000 @@ -65,6 +65,7 @@ import Distribution.Simple.Setup ( ConfigFlags(..), configureOptions, defaultConfigFlags , HaddockFlags(..), haddockOptions, defaultHaddockFlags + , TestFlags(..), defaultTestFlags , installDirsOptions, optionDistPref , programDbPaths', programDbOptions , Flag(..), toFlag, flagToMaybe, fromFlagOrDefault ) @@ -151,7 +152,8 @@ savedGlobalInstallDirs :: InstallDirs (Flag PathTemplate), savedUploadFlags :: UploadFlags, savedReportFlags :: ReportFlags, - savedHaddockFlags :: HaddockFlags + savedHaddockFlags :: HaddockFlags, + savedTestFlags :: TestFlags } deriving Generic instance Monoid SavedConfig where @@ -168,7 +170,8 @@ savedGlobalInstallDirs = combinedSavedGlobalInstallDirs, savedUploadFlags = combinedSavedUploadFlags, savedReportFlags = combinedSavedReportFlags, - savedHaddockFlags = combinedSavedHaddockFlags + savedHaddockFlags = combinedSavedHaddockFlags, + savedTestFlags = combinedSavedTestFlags } where -- This is ugly, but necessary. If we're mappending two config files, we @@ -360,7 +363,9 @@ configPreferences = lastNonEmpty configPreferences, configSolver = combine configSolver, configAllowNewer = combineMonoid savedConfigureExFlags configAllowNewer, - configAllowOlder = combineMonoid savedConfigureExFlags configAllowOlder + configAllowOlder = combineMonoid savedConfigureExFlags configAllowOlder, + configWriteGhcEnvironmentFilesPolicy + = combine configWriteGhcEnvironmentFilesPolicy } where combine = combine' savedConfigureExFlags @@ -422,6 +427,19 @@ combine = combine' savedHaddockFlags lastNonEmpty = lastNonEmpty' savedHaddockFlags + combinedSavedTestFlags = TestFlags { + testDistPref = combine testDistPref, + testVerbosity = combine testVerbosity, + testHumanLog = combine testHumanLog, + testMachineLog = combine testMachineLog, + testShowDetails = combine testShowDetails, + testKeepTix = combine testKeepTix, + testOptions = lastNonEmpty testOptions + } + where + combine = combine' savedTestFlags + lastNonEmpty = lastNonEmpty' savedTestFlags + -- -- * Default config @@ -744,8 +762,8 @@ savedGlobalInstallDirs = fmap toFlag globalInstallDirs, savedUploadFlags = commandDefaultFlags uploadCommand, savedReportFlags = commandDefaultFlags reportCommand, - savedHaddockFlags = defaultHaddockFlags - + savedHaddockFlags = defaultHaddockFlags, + savedTestFlags = defaultTestFlags } conf1 <- extendToEffectiveConfig conf0 let globalFlagsConf1 = savedGlobalFlags conf1 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Configure.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Configure.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Configure.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Configure.hs 2018-11-27 22:50:00.000000000 +0000 @@ -63,7 +63,11 @@ import Distribution.Package ( Package(..), packageName, PackageId ) import Distribution.Types.Dependency - ( Dependency(..), thisPackageVersion ) + ( thisPackageVersion ) +import Distribution.Types.GivenComponent + ( GivenComponent(..) ) +import Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint(..) ) import qualified Distribution.PackageDescription as PkgDesc import Distribution.PackageDescription.Parsec ( readGenericPackageDescription ) @@ -254,7 +258,9 @@ -- Return the setup dependencies computed by the solver ReadyPackage cpkg <- mpkg return [ ( cid, srcid ) - | ConfiguredId srcid (Just PkgDesc.CLibName) cid <- CD.setupDeps (confPkgDeps cpkg) + | ConfiguredId srcid + (Just (PkgDesc.CLibName PkgDesc.LMainLibName)) cid + <- CD.setupDeps (confPkgDeps cpkg) ] -- | Warn if any constraints or preferences name packages that are not in the @@ -275,7 +281,7 @@ where unknownConstraints = filter (unknown . userConstraintPackageName . fst) $ configExConstraints flags - unknownPreferences = filter (unknown . \(Dependency name _) -> name) $ + unknownPreferences = filter (unknown . \(PackageVersionConstraint name _) -> name) $ configPreferences flags unknown pkg = null (lookupPackageName installedPkgIndex pkg) && not (elemByPackageName sourcePkgIndex pkg) @@ -322,7 +328,7 @@ . addPreferences -- preferences from the config file or command line [ PackageVersionPreference name ver - | Dependency name ver <- configPreferences configExFlags ] + | PackageVersionConstraint name ver <- configPreferences configExFlags ] . addConstraints -- version constraints from the config file or command line @@ -401,9 +407,11 @@ -- deps. In the end only one set gets passed to Setup.hs configure, -- depending on the Cabal version we are talking to. configConstraints = [ thisPackageVersion srcid - | ConfiguredId srcid (Just PkgDesc.CLibName) _uid <- CD.nonSetupDeps deps ], - configDependencies = [ (packageName srcid, uid) - | ConfiguredId srcid (Just PkgDesc.CLibName) uid <- CD.nonSetupDeps deps ], + | ConfiguredId srcid (Just (PkgDesc.CLibName PkgDesc.LMainLibName)) _uid + <- CD.nonSetupDeps deps ], + configDependencies = [ GivenComponent (packageName srcid) cname uid + | ConfiguredId srcid (Just (PkgDesc.CLibName cname)) uid + <- CD.nonSetupDeps deps ], -- Use '--exact-configuration' if supported. configExactConfiguration = toFlag True, configVerbosity = toFlag verbosity, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Dependency.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Dependency.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Dependency.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Dependency.hs 2018-11-27 22:50:00.000000000 +0000 @@ -472,8 +472,8 @@ relaxPackageDeps relKind RelaxDepsAll gpd = PD.transformAllBuildDepends relaxAll gpd where relaxAll :: Dependency -> Dependency - relaxAll (Dependency pkgName verRange) = - Dependency pkgName (removeBound relKind RelaxDepModNone verRange) + relaxAll (Dependency pkgName verRange cs) = + Dependency pkgName (removeBound relKind RelaxDepModNone verRange) cs relaxPackageDeps relKind (RelaxDepsSome depsToRelax0) gpd = PD.transformAllBuildDepends relaxSome gpd @@ -493,13 +493,13 @@ | otherwise -> Nothing relaxSome :: Dependency -> Dependency - relaxSome d@(Dependency depName verRange) + relaxSome d@(Dependency depName verRange cs) | Just relMod <- Map.lookup RelaxDepSubjectAll depsToRelax = -- a '*'-subject acts absorbing, for consistency with -- the 'Semigroup RelaxDeps' instance - Dependency depName (removeBound relKind relMod verRange) + Dependency depName (removeBound relKind relMod verRange) cs | Just relMod <- Map.lookup (RelaxDepSubjectPkg depName) depsToRelax = - Dependency depName (removeBound relKind relMod verRange) + Dependency depName (removeBound relKind relMod verRange) cs | otherwise = d -- no-op -- | Internal helper for 'relaxPackageDeps' @@ -645,7 +645,7 @@ mkDefaultSetupDeps :: UnresolvedSourcePackage -> Maybe [Dependency] mkDefaultSetupDeps srcpkg | affected = Just [Dependency (mkPackageName "Cabal") - (orLaterVersion $ mkVersion [1,24])] + (orLaterVersion $ mkVersion [1,24]) (Set.singleton PD.LMainLibName)] | otherwise = Nothing where gpkgdesc = packageDescription srcpkg @@ -943,10 +943,10 @@ packageSatisfiesDependency (PackageIdentifier name version) - (Dependency name' versionRange) = assert (name == name') $ + (Dependency name' versionRange _) = assert (name == name') $ version `withinRange` versionRange - dependencyName (Dependency name _) = name + dependencyName (Dependency name _ _) = name mergedDeps :: [MergeResult Dependency PackageId] mergedDeps = mergeDeps requiredDeps (CD.flatDeps specifiedDeps) @@ -1018,9 +1018,9 @@ where -- Constraints requiredVersions = packageConstraints pkgname - pkgDependency = Dependency pkgname requiredVersions choices = PackageIndex.lookupDependency sourcePkgIndex - pkgDependency + pkgname + requiredVersions -- Preferences PackagePreferences preferredVersions preferInstalled _ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/DistDirLayout.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/DistDirLayout.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/DistDirLayout.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/DistDirLayout.hs 2018-11-27 22:50:00.000000000 +0000 @@ -36,6 +36,7 @@ import Distribution.Pretty ( prettyShow ) import Distribution.Types.ComponentName +import Distribution.Types.LibraryName import Distribution.System @@ -199,8 +200,8 @@ display (distParamPackageId params) (case distParamComponentName params of Nothing -> "" - Just CLibName -> "" - Just (CSubLibName name) -> "l" display name + Just (CLibName LMainLibName) -> "" + Just (CLibName (LSubLibName name)) -> "l" display name Just (CFLibName name) -> "f" display name Just (CExeName name) -> "x" display name Just (CTestName name) -> "t" display name @@ -273,7 +274,7 @@ mkCabalDirLayout cabalDir Nothing Nothing mkCabalDirLayout :: FilePath -- ^ Cabal directory - -> Maybe FilePath -- ^ Store directory + -> Maybe FilePath -- ^ Store directory. Must be absolute -> Maybe FilePath -- ^ Log directory -> CabalDirLayout mkCabalDirLayout cabalDir mstoreDir mlogDir = @@ -282,4 +283,4 @@ cabalStoreDirLayout = defaultStoreDirLayout (fromMaybe (cabalDir "store") mstoreDir) cabalLogsDirectory = fromMaybe (cabalDir "logs") mlogDir - cabalWorldFile = cabalDir "world" \ No newline at end of file + cabalWorldFile = cabalDir "world" diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/GenBounds.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/GenBounds.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/GenBounds.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/GenBounds.hs 2018-11-27 22:50:00.000000000 +0000 @@ -144,10 +144,10 @@ traverse_ (putStrLn . (++",") . showBounds padTo) thePkgs depName :: Dependency -> String - depName (Dependency pn _) = unPackageName pn + depName (Dependency pn _ _) = unPackageName pn depVersion :: Dependency -> VersionRange - depVersion (Dependency _ vr) = vr + depVersion (Dependency _ vr _) = vr -- | The message printed when some dependencies are found to be lacking proper -- PVP-mandated bounds. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/HttpUtils.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/HttpUtils.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/HttpUtils.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/HttpUtils.hs 2018-11-27 22:50:00.000000000 +0000 @@ -269,7 +269,7 @@ configureTransport :: Verbosity -> [FilePath] -> Maybe String -> IO HttpTransport configureTransport verbosity extraPath (Just name) = - -- the user secifically selected a transport by name so we'll try and + -- the user specifically selected a transport by name so we'll try and -- configure that one case find (\(name',_,_,_) -> name' == name) supportedTransports of diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/IndexUtils.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/IndexUtils.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/IndexUtils.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/IndexUtils.hs 2018-11-27 22:50:00.000000000 +0000 @@ -275,7 +275,7 @@ let (pkgs, prefs) = mconcat pkgss prefs' = Map.fromListWith intersectVersionRanges - [ (name, range) | Dependency name range <- prefs ] + [ (name, range) | Dependency name range _ <- prefs ] _ <- evaluate pkgs _ <- evaluate prefs' return SourcePackageDb { @@ -703,7 +703,7 @@ let srcpkg = mkPkg (BuildTreeRef refType (packageId pkg) pkg path blockno) accum srcpkgs (srcpkg:btrs) prefs entries - accum srcpkgs btrs prefs (CachePreference pref@(Dependency pn _) _ _ : entries) = + accum srcpkgs btrs prefs (CachePreference pref@(Dependency pn _ _) _ _ : entries) = accum srcpkgs btrs (Map.insert pn pref prefs) entries getEntryContent :: BlockNo -> IO ByteString diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Init/Types.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Init/Types.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Init/Types.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Init/Types.hs 2018-11-27 22:50:00.000000000 +0000 @@ -69,6 +69,8 @@ , sourceDirs :: Maybe [String] , buildTools :: Maybe [String] + , initHcPath :: Flag FilePath + , initVerbosity :: Flag Verbosity , overwrite :: Flag Bool } diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Init.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Init.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Init.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Init.hs 2018-11-27 22:50:00.000000000 +0000 @@ -39,6 +39,7 @@ import Data.Function ( on ) import qualified Data.Map as M +import qualified Data.Set as Set import Control.Monad ( (>=>), join, forM_, mapM, mapM_ ) import Control.Arrow @@ -56,6 +57,8 @@ import Distribution.InstalledPackageInfo ( InstalledPackageInfo, exposed ) import qualified Distribution.Package as P +import Distribution.Types.LibraryName + ( LibraryName(..) ) import Language.Haskell.Extension ( Language(..) ) import Distribution.Client.Init.Types @@ -527,13 +530,14 @@ toDep :: [P.PackageIdentifier] -> IO P.Dependency -- If only one version, easy. We change e.g. 0.4.2 into 0.4.* - toDep [pid] = return $ P.Dependency (P.pkgName pid) (pvpize desugar . P.pkgVersion $ pid) + toDep [pid] = return $ P.Dependency (P.pkgName pid) (pvpize desugar . P.pkgVersion $ pid) (Set.singleton LMainLibName) --TODO sublibraries -- Otherwise, choose the latest version and issue a warning. toDep pids = do message flags ("\nWarning: multiple versions of " ++ display (P.pkgName . head $ pids) ++ " provide " ++ display m ++ ", choosing the latest.") return $ P.Dependency (P.pkgName . head $ pids) (pvpize desugar . maximum . map P.pkgVersion $ pids) + (Set.singleton LMainLibName) --TODO take into account sublibraries -- | Given a version, return an API-compatible (according to PVP) version range. -- diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Install.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Install.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Install.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Install.hs 2018-11-27 22:50:00.000000000 +0000 @@ -96,7 +96,7 @@ import qualified Distribution.Client.BuildReports.Storage as BuildReports ( storeAnonymous, storeLocal, fromInstallPlan, fromPlanningFailure ) import qualified Distribution.Client.InstallSymlink as InstallSymlink - ( symlinkBinaries ) + ( OverwritePolicy(..), symlinkBinaries ) import qualified Distribution.Client.Win32SelfUpgrade as Win32SelfUpgrade import qualified Distribution.Client.World as World import qualified Distribution.InstalledPackageInfo as Installed @@ -123,12 +123,13 @@ import Distribution.Simple.Setup ( haddockCommand, HaddockFlags(..) , buildCommand, BuildFlags(..), emptyBuildFlags + , TestFlags , toFlag, fromFlag, fromFlagOrDefault, flagToMaybe, defaultDistPref ) import qualified Distribution.Simple.Setup as Cabal ( Flag(..) , copyCommand, CopyFlags(..), emptyCopyFlags , registerCommand, RegisterFlags(..), emptyRegisterFlags - , testCommand, TestFlags(..), emptyTestFlags ) + , testCommand, TestFlags(..) ) import Distribution.Simple.Utils ( createDirectoryIfMissingVerbose, comparing , writeFileAtomic, withUTF8FileContents ) @@ -142,7 +143,11 @@ , Package(..), HasMungedPackageId(..), HasUnitId(..) , UnitId ) import Distribution.Types.Dependency - ( Dependency(..), thisPackageVersion ) + ( thisPackageVersion ) +import Distribution.Types.GivenComponent + ( GivenComponent(..) ) +import Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint(..) ) import Distribution.Types.MungedPackageId import qualified Distribution.PackageDescription as PackageDescription import Distribution.PackageDescription @@ -201,10 +206,11 @@ -> ConfigExFlags -> InstallFlags -> HaddockFlags + -> TestFlags -> [UserTarget] -> IO () install verbosity packageDBs repos comp platform progdb useSandbox mSandboxPkgInfo - globalFlags configFlags configExFlags installFlags haddockFlags + globalFlags configFlags configExFlags installFlags haddockFlags testFlags userTargets0 = do unless (installRootCmd installFlags == Cabal.NoFlag) $ @@ -233,7 +239,7 @@ args :: InstallArgs args = (packageDBs, repos, comp, platform, progdb, useSandbox, mSandboxPkgInfo, globalFlags, configFlags, configExFlags, - installFlags, haddockFlags) + installFlags, haddockFlags, testFlags) die'' message = die' verbosity (message ++ if isUseSandbox useSandbox then installFailedInSandbox else []) @@ -266,14 +272,15 @@ , ConfigFlags , ConfigExFlags , InstallFlags - , HaddockFlags ) + , HaddockFlags + , TestFlags ) -- | Make an install context given install arguments. makeInstallContext :: Verbosity -> InstallArgs -> Maybe [UserTarget] -> IO InstallContext makeInstallContext verbosity (packageDBs, repoCtxt, comp, _, progdb,_,_, - globalFlags, _, configExFlags, installFlags, _) mUserTargets = do + globalFlags, _, configExFlags, installFlags, _, _) mUserTargets = do let idxState = flagToMaybe (installIndexState installFlags) @@ -312,7 +319,7 @@ makeInstallPlan verbosity (_, _, comp, platform, _, _, mSandboxPkgInfo, _, configFlags, configExFlags, installFlags, - _) + _, _) (installedPkgIndex, sourcePkgDb, pkgConfigDb, _, pkgSpecifiers, _) = do @@ -328,7 +335,7 @@ -> SolverInstallPlan -> IO () processInstallPlan verbosity - args@(_,_, _, _, _, _, _, _, configFlags, _, installFlags, _) + args@(_,_, _, _, _, _, _, _, configFlags, _, installFlags, _, _) (installedPkgIndex, sourcePkgDb, _, userTargets, pkgSpecifiers, _) installPlan0 = do @@ -405,7 +412,7 @@ . addPreferences -- preferences from the config file or command line [ PackageVersionPreference name ver - | Dependency name ver <- configPreferences configExFlags ] + | PackageVersionConstraint name ver <- configPreferences configExFlags ] . addConstraints -- version constraints from the config file or command line @@ -725,7 +732,12 @@ revDepGraphEdges :: [(PackageId, PackageId)] revDepGraphEdges = [ (rpid, packageId cpkg) | (ReadyPackage cpkg, _) <- plan - , ConfiguredId rpid (Just PackageDescription.CLibName) _ + , ConfiguredId + rpid + (Just + (PackageDescription.CLibName + PackageDescription.LMainLibName)) + _ <- CD.flatDeps (confPkgDeps cpkg) ] revDeps :: Map.Map PackageId [PackageId] @@ -741,7 +753,7 @@ -> IO () reportPlanningFailure verbosity (_, _, comp, platform, _, _, _ - ,_, configFlags, _, installFlags, _) + ,_, configFlags, _, installFlags, _, _) (_, sourcePkgDb, _, _, pkgSpecifiers, _) message = do @@ -821,7 +833,7 @@ -> IO () postInstallActions verbosity (packageDBs, _, comp, platform, progdb, useSandbox, mSandboxPkgInfo - ,globalFlags, configFlags, _, installFlags, _) + ,globalFlags, configFlags, _, installFlags, _, _) targets installPlan buildOutcomes = do updateSandboxTimestampsFile verbosity useSandbox mSandboxPkgInfo @@ -965,6 +977,7 @@ symlinkBinaries verbosity platform comp configFlags installFlags plan buildOutcomes = do failed <- InstallSymlink.symlinkBinaries platform comp + InstallSymlink.NeverOverwrite configFlags installFlags plan buildOutcomes case failed of @@ -1074,7 +1087,7 @@ -> IO BuildOutcomes performInstallations verbosity (packageDBs, repoCtxt, comp, platform, progdb, useSandbox, _, - globalFlags, configFlags, configExFlags, installFlags, haddockFlags) + globalFlags, configFlags, configExFlags, installFlags, haddockFlags, testFlags) installedPkgIndex installPlan = do -- With 'install -j' it can be a bit hard to tell whether a sandbox is used. @@ -1100,7 +1113,8 @@ (setupScriptOptions installedPkgIndex cacheLock rpkg) configFlags' - installFlags haddockFlags comp progdb + installFlags haddockFlags testFlags + comp progdb platform pkg rpkg pkgoverride mpath useLogFile where @@ -1242,10 +1256,15 @@ -- In the end only one set gets passed to Setup.hs configure, depending on -- the Cabal version we are talking to. configConstraints = [ thisPackageVersion srcid - | ConfiguredId srcid (Just PackageDescription.CLibName) _ipid + | ConfiguredId + srcid + (Just + (PackageDescription.CLibName + PackageDescription.LMainLibName)) + _ipid <- CD.nonSetupDeps deps ], - configDependencies = [ (packageName srcid, dep_ipid) - | ConfiguredId srcid (Just PackageDescription.CLibName) dep_ipid + configDependencies = [ GivenComponent (packageName srcid) cname dep_ipid + | ConfiguredId srcid (Just (PackageDescription.CLibName cname)) dep_ipid <- CD.nonSetupDeps deps ], -- Use '--exact-configuration' if supported. configExactConfiguration = toFlag True, @@ -1362,6 +1381,7 @@ -> ConfigFlags -> InstallFlags -> HaddockFlags + -> TestFlags -> Compiler -> ProgramDb -> Platform @@ -1373,7 +1393,7 @@ -> IO BuildOutcome installUnpackedPackage verbosity installLock numJobs scriptOptions - configFlags installFlags haddockFlags comp progdb + configFlags installFlags haddockFlags testFlags comp progdb platform pkg rpkg pkgoverride workingDir useLogFile = do -- Override the .cabal file if necessary case pkgoverride of @@ -1420,7 +1440,7 @@ -- Tests phase onFailure TestsFailed $ do when (testsEnabled && PackageDescription.hasTests pkg) $ - setup Cabal.testCommand testFlags mLogPath + setup Cabal.testCommand testFlags' mLogPath let testsResult | testsEnabled = TestsOk | otherwise = TestsNotTried @@ -1470,7 +1490,7 @@ } testsEnabled = fromFlag (configTests configFlags) && fromFlagOrDefault False (installRunTests installFlags) - testFlags _ = Cabal.emptyTestFlags { + testFlags' _ = testFlags { Cabal.testDistPref = configDistPref configFlags } copyFlags _ = Cabal.emptyCopyFlags { diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/InstallPlan.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/InstallPlan.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/InstallPlan.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/InstallPlan.hs 2018-11-27 22:50:00.000000000 +0000 @@ -527,7 +527,7 @@ Cabal.NoFlag Cabal.NoFlag (packageId spkg) - PD.CLibName + (PD.CLibName PD.LMainLibName) (Just (map confInstId (CD.libraryDeps deps), solverPkgFlags spkg)), confPkgSource = solverPkgSource spkg, diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/InstallSymlink.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/InstallSymlink.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/InstallSymlink.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/InstallSymlink.hs 2018-11-27 22:50:00.000000000 +0000 @@ -12,6 +12,7 @@ -- Managing installing binaries with symlinks. ----------------------------------------------------------------------------- module Distribution.Client.InstallSymlink ( + OverwritePolicy(..), symlinkBinaries, symlinkBinary, ) where @@ -27,16 +28,22 @@ import Distribution.Simple.Compiler import Distribution.System +data OverwritePolicy = NeverOverwrite | AlwaysOverwrite + deriving (Show, Eq) + symlinkBinaries :: Platform -> Compiler + -> OverwritePolicy -> ConfigFlags -> InstallFlags -> InstallPlan -> BuildOutcomes -> IO [(PackageIdentifier, UnqualComponentName, FilePath)] -symlinkBinaries _ _ _ _ _ _ = return [] +symlinkBinaries _ _ _ _ _ _ _ = return [] -symlinkBinary :: FilePath -> FilePath -> UnqualComponentName -> String -> IO Bool -symlinkBinary _ _ _ _ = fail "Symlinking feature not available on Windows" +symlinkBinary :: OverwritePolicy + -> FilePath -> FilePath -> UnqualComponentName -> String + -> IO Bool +symlinkBinary _ _ _ _ _ = fail "Symlinking feature not available on Windows" #else @@ -87,6 +94,9 @@ import Data.Maybe ( catMaybes ) +data OverwritePolicy = NeverOverwrite | AlwaysOverwrite + deriving (Show, Eq) + -- | We would like by default to install binaries into some location that is on -- the user's PATH. For per-user installations on Unix systems that basically -- means the @~/bin/@ directory. On the majority of platforms the @~/bin/@ @@ -108,12 +118,15 @@ -- with symlinks so is not available to Windows users. -- symlinkBinaries :: Platform -> Compiler + -> OverwritePolicy -> ConfigFlags -> InstallFlags -> InstallPlan -> BuildOutcomes -> IO [(PackageIdentifier, UnqualComponentName, FilePath)] -symlinkBinaries platform comp configFlags installFlags plan buildOutcomes = +symlinkBinaries platform comp overwritePolicy + configFlags installFlags + plan buildOutcomes = case flagToMaybe (installSymlinkBinDir installFlags) of Nothing -> return [] Just symlinkBinDir @@ -125,6 +138,7 @@ fmap catMaybes $ sequence [ do privateBinDir <- pkgBinDir pkg ipid ok <- symlinkBinary + overwritePolicy publicBinDir privateBinDir publicExeName privateExeName if ok @@ -187,7 +201,8 @@ (CompilerId compilerFlavor _) = compilerInfoId cinfo symlinkBinary :: - FilePath -- ^ The canonical path of the public bin dir eg + OverwritePolicy -- ^ Whether to force overwrite an existing file + -> FilePath -- ^ The canonical path of the public bin dir eg -- @/home/user/bin@ -> FilePath -- ^ The canonical path of the private bin dir eg -- @/home/user/.cabal/bin@ @@ -199,13 +214,16 @@ -- there was another file there already that we did -- not own. Other errors like permission errors just -- propagate as exceptions. -symlinkBinary publicBindir privateBindir publicName privateName = do +symlinkBinary overwritePolicy publicBindir privateBindir publicName privateName = do ok <- targetOkToOverwrite (publicBindir publicName') (privateBindir privateName) case ok of - NotOurFile -> return False - NotExists -> mkLink >> return True - OkToOverwrite -> rmLink >> mkLink >> return True + NotExists -> mkLink >> return True + OkToOverwrite -> rmLink >> mkLink >> return True + NotOurFile -> + case overwritePolicy of + NeverOverwrite -> return False + AlwaysOverwrite -> rmLink >> mkLink >> return True where publicName' = display publicName relativeBindir = makeRelative publicBindir privateBindir diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/List.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/List.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/List.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/List.hs 2018-11-27 22:50:00.000000000 +0000 @@ -231,9 +231,9 @@ selectedInstalledPkgs = InstalledPackageIndex.lookupDependency installedPkgIndex - (Dependency name verConstraint) + name verConstraint selectedSourcePkgs = PackageIndex.lookupDependency sourcePkgIndex - (Dependency name verConstraint) + name verConstraint selectedSourcePkg' = latestWithPref pref selectedSourcePkgs -- display a specific package version if the user diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Outdated.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Outdated.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Outdated.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Outdated.hs 2018-11-27 22:50:00.000000000 +0000 @@ -43,7 +43,7 @@ (Dependency(..), depPkgName, simplifyDependency) import Distribution.Verbosity (Verbosity, silent) import Distribution.Version - (Version, LowerBound(..), UpperBound(..) + (Version, VersionRange, LowerBound(..), UpperBound(..) ,asVersionIntervals, majorBoundVersion) import Distribution.PackageDescription.Parsec (readGenericPackageDescription) @@ -107,7 +107,7 @@ then do when (not simpleOutput) $ notice verbosity "Outdated dependencies:" - for_ outdatedDeps $ \(d@(Dependency pn _), v) -> + for_ outdatedDeps $ \(d@(Dependency pn _ _), v) -> let outdatedDep = if simpleOutput then display pn else display d ++ " (latest: " ++ display v ++ ")" in notice verbosity outdatedDep @@ -179,10 +179,10 @@ mapMaybe isOutdated $ map simplifyDependency deps where isOutdated :: Dependency -> Maybe (Dependency, Version) - isOutdated dep + isOutdated dep@(Dependency pname vr _) | ignorePred (depPkgName dep) = Nothing | otherwise = - let this = map packageVersion $ lookupDependency pkgIndex dep + let this = map packageVersion $ lookupDependency pkgIndex pname vr latest = lookupLatest dep in (\v -> (dep, v)) `fmap` isOutdated' this latest @@ -195,17 +195,16 @@ in if this' < latest' then Just latest' else Nothing lookupLatest :: Dependency -> [Version] - lookupLatest dep + lookupLatest dep@(Dependency pname vr _) | minorPred (depPkgName dep) = - map packageVersion $ lookupDependency pkgIndex (relaxMinor dep) + map packageVersion $ lookupDependency pkgIndex pname (relaxMinor vr) | otherwise = map packageVersion $ lookupPackageName pkgIndex (depPkgName dep) - relaxMinor :: Dependency -> Dependency - relaxMinor (Dependency pn vr) = (Dependency pn vr') - where - vr' = let vis = asVersionIntervals vr - (LowerBound v0 _,upper) = last vis - in case upper of - NoUpperBound -> vr - UpperBound _v1 _ -> majorBoundVersion v0 + relaxMinor :: VersionRange -> VersionRange + relaxMinor vr = + let vis = asVersionIntervals vr + (LowerBound v0 _,upper) = last vis + in case upper of + NoUpperBound -> vr + UpperBound _v1 _ -> majorBoundVersion v0 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/PackageUtils.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/PackageUtils.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/PackageUtils.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/PackageUtils.hs 2018-11-27 22:50:00.000000000 +0000 @@ -33,7 +33,7 @@ where -- True if this dependency is an internal one (depends on a library -- defined in the same package). - internal (Dependency depName versionRange) = + internal (Dependency depName versionRange _) = (depName == packageName pkg && packageVersion pkg `withinRange` versionRange) || (Just (packageNameToUnqualComponentName depName) `elem` map libName (subLibraries pkg) && diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectBuilding.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectBuilding.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectBuilding.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectBuilding.hs 2018-11-27 22:50:00.000000000 +0000 @@ -1,8 +1,11 @@ -{-# LANGUAGE CPP, BangPatterns, RecordWildCards, NamedFieldPuns, - ScopedTypeVariables #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE NoMonoLocalBinds #-} -{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE NoMonoLocalBinds #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} -- | -- @@ -69,7 +72,8 @@ ( ProgressPhase(..), progressMessage, removeExistingFile ) import Distribution.Compat.Lens -import Distribution.Package hiding (InstalledPackageId, installedPackageId) +import Distribution.Package hiding + (InstalledPackageId, installedPackageId) import qualified Distribution.PackageDescription as PD import Distribution.InstalledPackageInfo (InstalledPackageInfo) import qualified Distribution.InstalledPackageInfo as Installed @@ -81,7 +85,8 @@ import qualified Distribution.Simple.Setup as Cabal import Distribution.Simple.Command (CommandUI) import qualified Distribution.Simple.Register as Cabal -import Distribution.Simple.LocalBuildInfo (ComponentName(..)) +import Distribution.Simple.LocalBuildInfo + ( ComponentName(..), LibraryName(..) ) import Distribution.Simple.Compiler ( Compiler, compilerId, PackageDB(..) ) @@ -233,7 +238,8 @@ case elabBuildStyle pkg of BuildAndInstall -> return (BuildStatusUnpack tarball) BuildInplaceOnly -> do - -- TODO: [nice to have] use a proper file monitor rather than this dir exists test + -- TODO: [nice to have] use a proper file monitor rather + -- than this dir exists test exists <- doesDirectoryExist srcdir if exists then dryRunLocalPkg pkg depsBuildStatus srcdir @@ -260,7 +266,8 @@ return (BuildStatusUpToDate buildResult) where packageFileMonitor = - newPackageFileMonitor shared distDirLayout (elabDistDirParams shared pkg) + newPackageFileMonitor shared distDirLayout + (elabDistDirParams shared pkg) -- | A specialised traversal over the packages in an install plan. @@ -410,7 +417,8 @@ -> IO (Either BuildStatusRebuild BuildResult) checkPackageFileMonitorChanged PackageFileMonitor{..} pkg srcdir depsBuildStatus = do - --TODO: [nice to have] some debug-level message about file changes, like rerunIfChanged + --TODO: [nice to have] some debug-level message about file + --changes, like rerunIfChanged configChanged <- checkFileMonitorChanged pkgFileMonitorConfig srcdir pkgconfig case configChanged of @@ -685,7 +693,8 @@ unpackTarballPhase tarball = withTarballLocalDirectory verbosity distDirLayout tarball - (packageId pkg) (elabDistDirParams sharedPackageConfig pkg) (elabBuildStyle pkg) + (packageId pkg) (elabDistDirParams sharedPackageConfig pkg) + (elabBuildStyle pkg) (elabPkgDescriptionOverride pkg) $ case elabBuildStyle pkg of @@ -703,7 +712,8 @@ buildInplace buildStatus srcdir builddir where - builddir = distBuildDirectory (elabDistDirParams sharedPackageConfig pkg) + builddir = distBuildDirectory + (elabDistDirParams sharedPackageConfig pkg) buildAndInstall srcdir builddir = buildAndInstallUnpackedPackage @@ -833,7 +843,8 @@ let srcrootdir = distUnpackedSrcRootDirectory srcdir = distUnpackedSrcDirectory pkgid builddir = distBuildDirectory dparams - -- TODO: [nice to have] use a proper file monitor rather than this dir exists test + -- TODO: [nice to have] use a proper file monitor rather + -- than this dir exists test exists <- doesDirectoryExist srcdir unless exists $ do createDirectoryIfMissingVerbose verbosity True srcrootdir @@ -860,7 +871,8 @@ -- exists <- doesFileExist cabalFile unless exists $ - die' verbosity $ "Package .cabal file not found in the tarball: " ++ cabalFile + die' verbosity $ + "Package .cabal file not found in the tarball: " ++ cabalFile -- Overwrite the .cabal with the one from the index, when appropriate -- @@ -886,7 +898,8 @@ -- system, though we'll still need to keep this hack for older packages. -- moveTarballShippedDistDirectory :: Verbosity -> DistDirLayout - -> FilePath -> PackageId -> DistDirParams -> IO () + -> FilePath -> PackageId -> DistDirParams + -> IO () moveTarballShippedDistDirectory verbosity DistDirLayout{distBuildDirectory} parentdir pkgid dparams = do distDirExists <- doesDirectoryExist tarballDistDir @@ -930,12 +943,13 @@ createDirectoryIfMissingVerbose verbosity True builddir initLogFile - --TODO: [code cleanup] deal consistently with talking to older Setup.hs versions, much like - -- we do for ghc, with a proper options type and rendering step - -- which will also let us call directly into the lib, rather than always - -- going via the lib's command line interface, which would also allow - -- passing data like installed packages, compiler, and program db for a - -- quicker configure. + --TODO: [code cleanup] deal consistently with talking to older + -- Setup.hs versions, much like we do for ghc, with a proper + -- options type and rendering step which will also let us + -- call directly into the lib, rather than always going via + -- the lib's command line interface, which would also allow + -- passing data like installed packages, compiler, and + -- program db for a quicker configure. --TODO: [required feature] docs and tests --TODO: [required feature] sudo re-exec @@ -963,23 +977,33 @@ annotateFailure mlogFile InstallFailed $ do let copyPkgFiles tmpDir = do - setup Cabal.copyCommand (copyFlags tmpDir) + let tmpDirNormalised = normalise tmpDir + setup Cabal.copyCommand (copyFlags tmpDirNormalised) -- Note that the copy command has put the files into -- @$tmpDir/$prefix@ so we need to return this dir so -- the store knows which dir will be the final store entry. - let prefix = dropDrive (InstallDirs.prefix (elabInstallDirs pkg)) - entryDir = tmpDir prefix + let prefix = normalise $ + dropDrive (InstallDirs.prefix (elabInstallDirs pkg)) + entryDir = tmpDirNormalised prefix LBS.writeFile (entryDir "cabal-hash.txt") (renderPackageHashInputs (packageHashInputs pkgshared pkg)) - -- Ensure that there are no files in `tmpDir`, that are not in `entryDir` - -- While this breaks the prefix-relocatable property of the lirbaries - -- it is necessary on macOS to stay under the load command limit of the - -- macOS mach-o linker. See also @PackageHash.hashedInstalledPackageIdVeryShort@. - otherFiles <- filter (not . isPrefixOf entryDir) <$> listFilesRecursive tmpDir - -- here's where we could keep track of the installed files ourselves - -- if we wanted to by making a manifest of the files in the tmp dir + -- Ensure that there are no files in `tmpDir`, that are + -- not in `entryDir`. While this breaks the + -- prefix-relocatable property of the libraries, it is + -- necessary on macOS to stay under the load command limit + -- of the macOS mach-o linker. See also + -- @PackageHash.hashedInstalledPackageIdVeryShort@. + -- + -- We also normalise paths to ensure that there are no + -- different representations for the same path. Like / and + -- \\ on windows under msys. + otherFiles <- filter (not . isPrefixOf entryDir) <$> + listFilesRecursive tmpDirNormalised + -- Here's where we could keep track of the installed files + -- ourselves if we wanted to by making a manifest of the + -- files in the tmp dir. return (entryDir, otherFiles) where listFilesRecursive :: FilePath -> IO [FilePath] @@ -995,7 +1019,8 @@ registerPkg | not (elabRequiresRegistration pkg) = debug verbosity $ - "registerPkg: elab does NOT require registration for " ++ display uid + "registerPkg: elab does NOT require registration for " + ++ display uid | otherwise = do -- We register ourselves rather than via Setup.hs. We need to -- grab and modify the InstalledPackageInfo. We decide what @@ -1024,8 +1049,9 @@ -- final location ourselves, perhaps we ought to do some sanity checks on -- the image dir first. - -- TODO: [required eventually] note that for nix-style installations it is not necessary to do - -- the 'withWin32SelfUpgrade' dance, but it would be necessary for a + -- TODO: [required eventually] note that for nix-style + -- installations it is not necessary to do the + -- 'withWin32SelfUpgrade' dance, but it would be necessary for a -- shared bin dir. --TODO: [required feature] docs and test phases @@ -1093,14 +1119,16 @@ setup :: CommandUI flags -> (Version -> flags) -> IO () setup cmd flags = setup' cmd flags (const []) - setup' :: CommandUI flags -> (Version -> flags) -> (Version -> [String]) -> IO () + setup' :: CommandUI flags -> (Version -> flags) -> (Version -> [String]) + -> IO () setup' cmd flags args = withLogging $ \mLogFileHandle -> setupWrapper verbosity scriptOptions { useLoggingHandle = mLogFileHandle - , useExtraEnvOverrides = dataDirsEnvironmentForPlan distDirLayout plan } + , useExtraEnvOverrides = dataDirsEnvironmentForPlan + distDirLayout plan } (Just (elabPkgDescription pkg)) cmd flags args @@ -1135,12 +1163,12 @@ componentHasHaddocks :: ComponentTarget -> Bool componentHasHaddocks (ComponentTarget name _) = case name of - CLibName -> hasHaddocks - CSubLibName _ -> elabHaddockInternal && hasHaddocks - CFLibName _ -> elabHaddockForeignLibs && hasHaddocks - CExeName _ -> elabHaddockExecutables && hasHaddocks - CTestName _ -> elabHaddockTestSuites && hasHaddocks - CBenchName _ -> elabHaddockBenchmarks && hasHaddocks + CLibName LMainLibName -> hasHaddocks + CLibName (LSubLibName _) -> elabHaddockInternal && hasHaddocks + CFLibName _ -> elabHaddockForeignLibs && hasHaddocks + CExeName _ -> elabHaddockExecutables && hasHaddocks + CTestName _ -> elabHaddockTestSuites && hasHaddocks + CBenchName _ -> elabHaddockBenchmarks && hasHaddocks where hasHaddocks = not (null (elabPkgDescription ^. componentModules name)) @@ -1171,10 +1199,12 @@ buildStatus srcdir builddir = do - --TODO: [code cleanup] there is duplication between the distdirlayout and the builddir here - -- builddir is not enough, we also need the per-package cachedir + --TODO: [code cleanup] there is duplication between the + -- distdirlayout and the builddir here builddir is not + -- enough, we also need the per-package cachedir createDirectoryIfMissingVerbose verbosity True builddir - createDirectoryIfMissingVerbose verbosity True (distPackageCacheDirectory dparams) + createDirectoryIfMissingVerbose verbosity True + (distPackageCacheDirectory dparams) -- Configure phase -- @@ -1273,7 +1303,8 @@ when (haddockTarget == Cabal.ForHackage) $ do let dest = distDirectory name <.> "tar.gz" name = haddockDirName haddockTarget (elabPkgDescription pkg) - docDir = distBuildDirectory distDirLayout dparams "doc" "html" + docDir = distBuildDirectory distDirLayout dparams + "doc" "html" Tar.createTarGzFile dest docDir name notice verbosity $ "Documentation tarball created: " ++ dest @@ -1321,9 +1352,11 @@ whenReRegister action = case buildStatus of -- We registered the package already - BuildStatusBuild (Just _) _ -> info verbosity "whenReRegister: previously registered" + BuildStatusBuild (Just _) _ -> + info verbosity "whenReRegister: previously registered" -- There is nothing to register - _ | null (elabBuildTargets pkg) -> info verbosity "whenReRegister: nothing to register" + _ | null (elabBuildTargets pkg) -> + info verbosity "whenReRegister: nothing to register" | otherwise -> action configureCommand = Cabal.configureCommand defaultProgramDb @@ -1371,7 +1404,8 @@ (Just (elabPkgDescription pkg)) cmd flags args - setup :: CommandUI flags -> (Version -> flags) -> (Version -> [String]) -> IO () + setup :: CommandUI flags -> (Version -> flags) -> (Version -> [String]) + -> IO () setup cmd flags args = setupWrapper verbosity scriptOptions @@ -1403,11 +1437,13 @@ where pkgConfParseFailed :: Installed.PError -> IO a pkgConfParseFailed perror = - die' verbosity $ "Couldn't parse the output of 'setup register --gen-pkg-config':" - ++ show perror + die' verbosity $ + "Couldn't parse the output of 'setup register --gen-pkg-config':" + ++ show perror readPkgConf pkgConfDir pkgConfFile = do - (warns, ipkg) <- withUTF8FileContents (pkgConfDir pkgConfFile) $ \pkgConfStr -> + (warns, ipkg) <- + withUTF8FileContents (pkgConfDir pkgConfFile) $ \pkgConfStr -> case Installed.parseInstalledPackageInfo pkgConfStr of Installed.ParseFailed perror -> pkgConfParseFailed perror Installed.ParseOk warns ipkg -> return (warns, ipkg) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Legacy.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Legacy.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Legacy.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Legacy.hs 2018-11-27 22:50:00.000000000 +0000 @@ -46,6 +46,7 @@ ( Flag(Flag), toFlag, fromFlagOrDefault , ConfigFlags(..), configureOptions , HaddockFlags(..), haddockOptions, defaultHaddockFlags + , TestFlags(..), testOptions', defaultTestFlags , programDbPaths', splitArgs ) import Distribution.Client.Setup @@ -80,6 +81,8 @@ import Distribution.Simple.Command ( CommandUI(commandOptions), ShowOrParseArgs(..) , OptionField, option, reqArg' ) +import Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint ) import qualified Data.Map as Map ------------------------------------------------------------------ @@ -99,7 +102,7 @@ legacyPackages :: [String], legacyPackagesOptional :: [String], legacyPackagesRepo :: [SourceRepo], - legacyPackagesNamed :: [Dependency], + legacyPackagesNamed :: [PackageVersionConstraint], legacySharedConfig :: LegacySharedConfig, legacyAllConfig :: LegacyPackageConfig, @@ -117,7 +120,8 @@ data LegacyPackageConfig = LegacyPackageConfig { legacyConfigureFlags :: ConfigFlags, legacyInstallPkgFlags :: InstallFlags, - legacyHaddockFlags :: HaddockFlags + legacyHaddockFlags :: HaddockFlags, + legacyTestFlags :: TestFlags } deriving Generic instance Monoid LegacyPackageConfig where @@ -156,13 +160,15 @@ commandLineFlagsToProjectConfig :: GlobalFlags -> ConfigFlags -> ConfigExFlags -> InstallFlags -> HaddockFlags + -> TestFlags -> ProjectConfig commandLineFlagsToProjectConfig globalFlags configFlags configExFlags - installFlags haddockFlags = + installFlags haddockFlags testFlags = mempty { projectConfigBuildOnly = convertLegacyBuildOnlyFlags globalFlags configFlags - installFlags haddockFlags, + installFlags haddockFlags + testFlags, projectConfigShared = convertLegacyAllPackageFlags globalFlags configFlags configExFlags installFlags, @@ -171,7 +177,7 @@ } where (localConfig, allConfig) = splitConfig (convertLegacyPerPackageFlags - configFlags installFlags haddockFlags) + configFlags installFlags haddockFlags testFlags) -- split the package config (from command line arguments) into -- those applied to all packages and those to local only. -- @@ -215,7 +221,8 @@ savedGlobalInstallDirs = _, savedUploadFlags = _, savedReportFlags = _, - savedHaddockFlags = haddockFlags + savedHaddockFlags = haddockFlags, + savedTestFlags = testFlags } = mempty { projectConfigBuildOnly = configBuildOnly, @@ -228,15 +235,16 @@ configExFlags' = defaultConfigExFlags <> configExFlags installFlags' = defaultInstallFlags <> installFlags haddockFlags' = defaultHaddockFlags <> haddockFlags + testFlags' = defaultTestFlags <> testFlags configAllPackages = convertLegacyPerPackageFlags - configFlags installFlags' haddockFlags' + configFlags installFlags' haddockFlags' testFlags' configShared = convertLegacyAllPackageFlags globalFlags configFlags configExFlags' installFlags' configBuildOnly = convertLegacyBuildOnlyFlags globalFlags configFlags - installFlags' haddockFlags' + installFlags' haddockFlags' testFlags' -- | Convert the project config from the legacy types to the 'ProjectConfig' @@ -254,7 +262,7 @@ configExFlags installSharedFlags, legacyAllConfig, legacyLocalConfig = LegacyPackageConfig configFlags installPerPkgFlags - haddockFlags, + haddockFlags testFlags, legacySpecificConfig } = @@ -272,21 +280,22 @@ projectConfigSpecificPackage = fmap perPackage legacySpecificConfig } where - configAllPackages = convertLegacyPerPackageFlags g i h - where LegacyPackageConfig g i h = legacyAllConfig + configAllPackages = convertLegacyPerPackageFlags g i h t + where LegacyPackageConfig g i h t = legacyAllConfig configLocalPackages = convertLegacyPerPackageFlags configFlags installPerPkgFlags haddockFlags + testFlags configPackagesShared= convertLegacyAllPackageFlags globalFlags (configFlags <> configShFlags) configExFlags installSharedFlags configBuildOnly = convertLegacyBuildOnlyFlags globalFlags configShFlags - installSharedFlags haddockFlags + installSharedFlags haddockFlags testFlags perPackage (LegacyPackageConfig perPkgConfigFlags perPkgInstallFlags - perPkgHaddockFlags) = + perPkgHaddockFlags perPkgTestFlags) = convertLegacyPerPackageFlags - perPkgConfigFlags perPkgInstallFlags perPkgHaddockFlags + perPkgConfigFlags perPkgInstallFlags perPkgHaddockFlags perPkgTestFlags -- | Helper used by other conversion functions that returns the @@ -325,7 +334,9 @@ configPreferences = projectConfigPreferences, configSolver = projectConfigSolver, configAllowOlder = projectConfigAllowOlder, - configAllowNewer = projectConfigAllowNewer + configAllowNewer = projectConfigAllowNewer, + configWriteGhcEnvironmentFilesPolicy + = projectConfigWriteGhcEnvironmentFilesPolicy } = configExFlags InstallFlags { @@ -353,8 +364,8 @@ -- 'PackageConfig' subset of the 'ProjectConfig'. -- convertLegacyPerPackageFlags :: ConfigFlags -> InstallFlags -> HaddockFlags - -> PackageConfig -convertLegacyPerPackageFlags configFlags installFlags haddockFlags = + -> TestFlags -> PackageConfig +convertLegacyPerPackageFlags configFlags installFlags haddockFlags testFlags = PackageConfig{..} where ConfigFlags { @@ -418,6 +429,14 @@ haddockContents = packageConfigHaddockContents } = haddockFlags + TestFlags { + testHumanLog = packageConfigTestHumanLog, + testMachineLog = packageConfigTestMachineLog, + testShowDetails = packageConfigTestShowDetails, + testKeepTix = packageConfigTestKeepTix, + testOptions = packageConfigTestTestOptions + } = testFlags + -- | Helper used by other conversion functions that returns the @@ -425,9 +444,10 @@ -- convertLegacyBuildOnlyFlags :: GlobalFlags -> ConfigFlags -> InstallFlags -> HaddockFlags + -> TestFlags -> ProjectConfigBuildOnly convertLegacyBuildOnlyFlags globalFlags configFlags - installFlags haddockFlags = + installFlags haddockFlags _ = ProjectConfigBuildOnly{..} where GlobalFlags { @@ -537,8 +557,9 @@ configPreferences = projectConfigPreferences, configSolver = projectConfigSolver, configAllowOlder = projectConfigAllowOlder, - configAllowNewer = projectConfigAllowNewer - + configAllowNewer = projectConfigAllowNewer, + configWriteGhcEnvironmentFilesPolicy + = projectConfigWriteGhcEnvironmentFilesPolicy } installFlags = InstallFlags { @@ -587,7 +608,8 @@ LegacyPackageConfig { legacyConfigureFlags = configFlags, legacyInstallPkgFlags= mempty, - legacyHaddockFlags = haddockFlags + legacyHaddockFlags = haddockFlags, + legacyTestFlags = mempty } where configFlags = ConfigFlags { @@ -655,7 +677,8 @@ LegacyPackageConfig { legacyConfigureFlags = configFlags, legacyInstallPkgFlags = installFlags, - legacyHaddockFlags = haddockFlags + legacyHaddockFlags = haddockFlags, + legacyTestFlags = testFlags } where configFlags = ConfigFlags { @@ -742,6 +765,16 @@ haddockArgs = mempty } + testFlags = TestFlags { + testDistPref = mempty, + testVerbosity = mempty, + testHumanLog = packageConfigTestHumanLog, + testMachineLog = packageConfigTestMachineLog, + testShowDetails = packageConfigTestShowDetails, + testKeepTix = packageConfigTestKeepTix, + testOptions = packageConfigTestTestOptions + } + ------------------------------------------------ -- Parsing and showing the project config file @@ -895,7 +928,7 @@ (\v conf -> conf { configAllowNewer = fmap AllowNewer v }) ] . filterFields - [ "cabal-lib-version", "solver" + [ "cabal-lib-version", "solver", "write-ghc-environment-files" -- not "constraint" or "preference", we use our own plural ones above ] . commandOptionsToFields @@ -1013,6 +1046,23 @@ ] . commandOptionsToFields ) (haddockOptions ParseArgs) + ++ + ( liftFields + legacyTestFlags + (\flags conf -> conf { legacyTestFlags = flags }) + . mapFieldNames + prefixTest + . addFields + [ newLineListField "test-options" + (showTokenQ . fromPathTemplate) (fmap toPathTemplate parseTokenQ) + testOptions + (\v conf -> conf { testOptions = v }) + ] + . filterFields + [ "log", "machine-log", "show-details", "keep-tix-files" ] + . commandOptionsToFields + ) (testOptions' ParseArgs) + where overrideFieldCompiler = @@ -1076,6 +1126,9 @@ caseWarning = PWarning $ "The '" ++ name ++ "' field is case sensitive, use 'True' or 'False'.") + prefixTest name | "test-" `isPrefixOf` name = name + | otherwise = "test-" ++ name + legacyPackageConfigSectionDescrs :: [SectionDescr LegacyProjectConfig] legacyPackageConfigSectionDescrs = diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Types.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Types.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Types.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig/Types.hs 2018-11-27 22:50:00.000000000 +0000 @@ -21,7 +21,8 @@ ) where import Distribution.Client.Types - ( RemoteRepo, AllowNewer(..), AllowOlder(..) ) + ( RemoteRepo, AllowNewer(..), AllowOlder(..) + , WriteGhcEnvironmentFilesPolicy ) import Distribution.Client.Dependency.Types ( PreSolver ) import Distribution.Client.Targets @@ -37,7 +38,8 @@ import Distribution.Package ( PackageName, PackageId, UnitId ) -import Distribution.Types.Dependency +import Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint ) import Distribution.Version ( Version ) import Distribution.System @@ -48,7 +50,7 @@ ( Compiler, CompilerFlavor , OptimisationLevel(..), ProfDetailLevel, DebugInfoLevel(..) ) import Distribution.Simple.Setup - ( Flag, HaddockTarget(..) ) + ( Flag, HaddockTarget(..), TestShowDetails(..) ) import Distribution.Simple.InstallDirs ( PathTemplate ) import Distribution.Utils.NubList @@ -105,7 +107,7 @@ projectPackagesRepo :: [SourceRepo], -- | Packages in this project from hackage repositories. - projectPackagesNamed :: [Dependency], + projectPackagesNamed :: [PackageVersionConstraint], -- See respective types for an explanation of what these -- values are about: @@ -181,11 +183,13 @@ -- solver configuration projectConfigConstraints :: [(UserConstraint, ConstraintSource)], - projectConfigPreferences :: [Dependency], + projectConfigPreferences :: [PackageVersionConstraint], projectConfigCabalVersion :: Flag Version, --TODO: [required eventually] unused projectConfigSolver :: Flag PreSolver, projectConfigAllowOlder :: Maybe AllowOlder, projectConfigAllowNewer :: Maybe AllowNewer, + projectConfigWriteGhcEnvironmentFilesPolicy + :: Flag WriteGhcEnvironmentFilesPolicy, projectConfigMaxBackjumps :: Flag Int, projectConfigReorderGoals :: Flag ReorderGoals, projectConfigCountConflicts :: Flag CountConflicts, @@ -261,6 +265,7 @@ packageConfigDebugInfo :: Flag DebugInfoLevel, packageConfigRunTests :: Flag Bool, --TODO: [required eventually] use this packageConfigDocumentation :: Flag Bool, --TODO: [required eventually] use this + -- Haddock options packageConfigHaddockHoogle :: Flag Bool, --TODO: [required eventually] use this packageConfigHaddockHtml :: Flag Bool, --TODO: [required eventually] use this packageConfigHaddockHtmlLocation :: Flag String, --TODO: [required eventually] use this @@ -274,7 +279,13 @@ packageConfigHaddockQuickJump :: Flag Bool, --TODO: [required eventually] use this packageConfigHaddockHscolourCss :: Flag FilePath, --TODO: [required eventually] use this packageConfigHaddockContents :: Flag PathTemplate, --TODO: [required eventually] use this - packageConfigHaddockForHackage :: Flag HaddockTarget + packageConfigHaddockForHackage :: Flag HaddockTarget, + -- Test options + packageConfigTestHumanLog :: Flag PathTemplate, + packageConfigTestMachineLog :: Flag PathTemplate, + packageConfigTestShowDetails :: Flag TestShowDetails, + packageConfigTestKeepTix :: Flag Bool, + packageConfigTestTestOptions :: [PathTemplate] } deriving (Eq, Show, Generic) @@ -361,7 +372,7 @@ solverSettingRemoteRepos :: [RemoteRepo], -- ^ Available Hackage servers. solverSettingLocalRepos :: [FilePath], solverSettingConstraints :: [(UserConstraint, ConstraintSource)], - solverSettingPreferences :: [Dependency], + solverSettingPreferences :: [PackageVersionConstraint], solverSettingFlagAssignment :: FlagAssignment, -- ^ For all local packages solverSettingFlagAssignments :: Map PackageName FlagAssignment, solverSettingCabalVersion :: Maybe Version, --TODO: [required eventually] unused diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectConfig.hs 2018-11-27 22:50:00.000000000 +0000 @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP, RecordWildCards, NamedFieldPuns, DeriveDataTypeable, LambdaCase #-} +{-# LANGUAGE CPP, BangPatterns, RecordWildCards, NamedFieldPuns, DeriveDataTypeable, LambdaCase #-} -- | Handling project configuration. -- @@ -74,6 +74,7 @@ import Distribution.Client.HttpUtils ( HttpTransport, configureTransport, transportCheckHttps , downloadURI ) +import Distribution.Client.Utils.Parsec (renderParseError) import Distribution.Solver.Types.SourcePackage import Distribution.Solver.Types.Settings @@ -82,7 +83,8 @@ import Distribution.Package ( PackageName, PackageId, packageId, UnitId ) -import Distribution.Types.Dependency +import Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint(..) ) import Distribution.System ( Platform ) import Distribution.Types.GenericPackageDescription @@ -92,7 +94,8 @@ import Distribution.Parsec.ParseResult ( runParseResult ) import Distribution.Parsec.Common as NewParser - ( PError, PWarning, showPWarning ) + ( PError, PWarning, showPWarning) +import Distribution.Pretty () import Distribution.Types.SourceRepo ( SourceRepo(..), RepoType(..), ) import Distribution.Simple.Compiler @@ -130,8 +133,8 @@ import Control.Monad.Trans (liftIO) import Control.Exception import Data.Either -import qualified Data.ByteString as BS -import qualified Data.ByteString.Lazy as LBS +import qualified Data.ByteString as BS +import qualified Data.ByteString.Lazy as LBS import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set @@ -638,7 +641,7 @@ | ProjectPackageLocalTarball FilePath | ProjectPackageRemoteTarball URI | ProjectPackageRemoteRepo SourceRepo - | ProjectPackageNamed Dependency + | ProjectPackageNamed PackageVersionConstraint deriving Show @@ -992,7 +995,7 @@ let pkgsNamed = [ NamedPackage pkgname [PackagePropertyVersion verrange] - | ProjectPackageNamed (Dependency pkgname verrange) <- pkgLocations ] + | ProjectPackageNamed (PackageVersionConstraint pkgname verrange) <- pkgLocations ] return $ concat [ pkgsLocalDirectory @@ -1218,16 +1221,33 @@ -- | Errors reported upon failing to parse a @.cabal@ file. -- -data CabalFileParseError = - CabalFileParseError - FilePath - [PError] - (Maybe Version) -- We might discover the spec version the package needs - [PWarning] - deriving (Show, Typeable) +data CabalFileParseError = CabalFileParseError + FilePath -- ^ @.cabal@ file path + BS.ByteString -- ^ @.cabal@ file contents + [PError] -- ^ errors + (Maybe Version) -- ^ We might discover the spec version the package needs + [PWarning] -- ^ warnings + deriving (Typeable) + +-- | Manual instance which skips file contentes +instance Show CabalFileParseError where + showsPrec d (CabalFileParseError fp _ es mv ws) = showParen (d > 10) + $ showString "CabalFileParseError" + . showChar ' ' . showsPrec 11 fp + . showChar ' ' . showsPrec 11 ("" :: String) + . showChar ' ' . showsPrec 11 es + . showChar ' ' . showsPrec 11 mv + . showChar ' ' . showsPrec 11 ws instance Exception CabalFileParseError +#if MIN_VERSION_base(4,8,0) + where + displayException = renderCabalFileParseError +#endif +renderCabalFileParseError :: CabalFileParseError -> String +renderCabalFileParseError (CabalFileParseError filePath contents errors _ warnings) = + renderParseError filePath contents errors warnings -- | Wrapper for the @.cabal@ file parser. It reports warnings on higher -- verbosity levels and throws 'CabalFileParseError' on failure. @@ -1244,7 +1264,7 @@ return pkg (warnings, Left (mspecVersion, errors)) -> - throwIO $ CabalFileParseError pkgfilename errors mspecVersion warnings + throwIO $ CabalFileParseError pkgfilename content errors mspecVersion warnings where formatWarnings warnings = "The package description file " ++ pkgfilename diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectOrchestration.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectOrchestration.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectOrchestration.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectOrchestration.hs 2018-11-27 22:50:00.000000000 +0000 @@ -98,6 +98,8 @@ import Prelude () import Distribution.Client.Compat.Prelude +import Distribution.Compat.Directory + ( makeAbsolute ) import Distribution.Client.ProjectConfig import Distribution.Client.ProjectPlanning @@ -111,7 +113,8 @@ import Distribution.Client.Types ( GenericReadyPackage(..), UnresolvedSourcePackage , PackageSpecifier(..) - , SourcePackageDb(..) ) + , SourcePackageDb(..) + , WriteGhcEnvironmentFilesPolicy(..) ) import Distribution.Solver.Types.PackageIndex ( lookupPackageName ) import qualified Distribution.Client.InstallPlan as InstallPlan @@ -122,6 +125,8 @@ import Distribution.Client.DistDirLayout import Distribution.Client.Config (getCabalDir) import Distribution.Client.Setup hiding (packageName) +import Distribution.Compiler + ( CompilerFlavor(GHC) ) import Distribution.Types.ComponentName ( componentNameString ) import Distribution.Types.UnqualComponentName @@ -136,6 +141,8 @@ , diffFlagAssignment ) import Distribution.Simple.LocalBuildInfo ( ComponentName(..), pkgComponents ) +import Distribution.Simple.Flag + ( fromFlagOrDefault ) import qualified Distribution.Simple.Setup as Setup import Distribution.Simple.Command (commandShowOptions) import Distribution.Simple.Configure (computeEffectiveProfiling) @@ -143,9 +150,11 @@ import Distribution.Simple.Utils ( die', warn, notice, noticeNoWrap, debugNoWrap ) import Distribution.Verbosity +import Distribution.Version + ( mkVersion ) import Distribution.Text import Distribution.Simple.Compiler - ( showCompilerId + ( compilerCompatVersion, showCompilerId , OptimisationLevel(..)) import qualified Data.Monoid as Mon @@ -196,8 +205,9 @@ } = projectConfigShared projectConfig mlogsDir = Setup.flagToMaybe projectConfigLogsDir - mstoreDir = Setup.flagToMaybe projectConfigStoreDir - cabalDirLayout = mkCabalDirLayout cabalDir mstoreDir mlogsDir + mstoreDir <- sequenceA $ makeAbsolute + <$> Setup.flagToMaybe projectConfigStoreDir + let cabalDirLayout = mkCabalDirLayout cabalDir mstoreDir mlogsDir buildSettings = resolveBuildTimeSettings verbosity cabalDirLayout @@ -388,11 +398,27 @@ pkgsBuildStatus buildOutcomes - void $ writePlanGhcEnvironment (distProjectRootDirectory - distDirLayout) - elaboratedPlanOriginal - elaboratedShared - postBuildStatus + -- Write the .ghc.environment file (if allowed by the env file write policy). + let writeGhcEnvFilesPolicy = + projectConfigWriteGhcEnvironmentFilesPolicy . projectConfigShared + $ projectConfig + + shouldWriteGhcEnvironment = + case fromFlagOrDefault WriteGhcEnvironmentFilesOnlyForGhc844AndNewer + writeGhcEnvFilesPolicy + of + AlwaysWriteGhcEnvironmentFiles -> True + NeverWriteGhcEnvironmentFiles -> False + WriteGhcEnvironmentFilesOnlyForGhc844AndNewer -> + let compiler = pkgConfigCompiler elaboratedShared + ghcCompatVersion = compilerCompatVersion GHC compiler + in maybe False (>= mkVersion [8,4,4]) ghcCompatVersion + + when shouldWriteGhcEnvironment $ + void $ writePlanGhcEnvironment (distProjectRootDirectory distDirLayout) + elaboratedPlanOriginal + elaboratedShared + postBuildStatus -- Finally if there were any build failures then report them and throw -- an exception to terminate the program @@ -639,17 +665,19 @@ in (pname, cname')) availableTargetsByPackageIdAndComponentName where - unqualComponentName :: PackageName -> ComponentName -> UnqualComponentName + unqualComponentName :: + PackageName -> ComponentName -> UnqualComponentName unqualComponentName pkgname = fromMaybe (packageNameToUnqualComponentName pkgname) . componentNameString -- Add in all the empty packages. These do not appear in the - -- availableTargetsByComponent map, since that only contains components - -- so packages with no components are invisible from that perspective. - -- The empty packages need to be there for proper error reporting, so users - -- can select the empty package and then we can report that it is empty, - -- otherwise we falsely report there is no such package at all. + -- availableTargetsByComponent map, since that only contains + -- components, so packages with no components are invisible from + -- that perspective. The empty packages need to be there for + -- proper error reporting, so users can select the empty package + -- and then we can report that it is empty, otherwise we falsely + -- report there is no such package at all. availableTargetsEmptyPackages = Map.fromList [ (packageId pkg, []) @@ -659,9 +687,10 @@ ElabPackage _ -> null (pkgComponents (elabPkgDescription pkg)) ] - --TODO: [research required] what if the solution has multiple versions of this package? - -- e.g. due to setup deps or due to multiple independent sets of - -- packages being built (e.g. ghc + ghcjs in a project) + --TODO: [research required] what if the solution has multiple + -- versions of this package? + -- e.g. due to setup deps or due to multiple independent sets + -- of packages being built (e.g. ghc + ghcjs in a project) filterTargetsKind :: ComponentKind -> [AvailableTarget k] -> [AvailableTarget k] filterTargetsKind ckind = filterTargetsKindWith (== ckind) @@ -734,12 +763,21 @@ data TargetProblemCommon = TargetNotInProject PackageName | TargetAvailableInIndex PackageName - | TargetComponentNotProjectLocal PackageId ComponentName SubComponentTarget - | TargetComponentNotBuildable PackageId ComponentName SubComponentTarget - | TargetOptionalStanzaDisabledByUser PackageId ComponentName SubComponentTarget - | TargetOptionalStanzaDisabledBySolver PackageId ComponentName SubComponentTarget - | TargetProblemUnknownComponent PackageName - (Either UnqualComponentName ComponentName) + + | TargetComponentNotProjectLocal + PackageId ComponentName SubComponentTarget + + | TargetComponentNotBuildable + PackageId ComponentName SubComponentTarget + + | TargetOptionalStanzaDisabledByUser + PackageId ComponentName SubComponentTarget + + | TargetOptionalStanzaDisabledBySolver + PackageId ComponentName SubComponentTarget + + | TargetProblemUnknownComponent + PackageName (Either UnqualComponentName ComponentName) -- The target matching stuff only returns packages local to the project, -- so these lookups should never fail, but if 'resolveTargets' is called @@ -785,7 +823,8 @@ ProjectBaseContext { buildSettings = BuildTimeSettings{buildSettingDryRun}, projectConfig = ProjectConfig { - projectConfigLocalPackages = PackageConfig {packageConfigOptimization} + projectConfigLocalPackages = + PackageConfig {packageConfigOptimization} } } ProjectBuildContext { @@ -799,8 +838,9 @@ | otherwise = noticeNoWrap verbosity $ unlines $ - (showBuildProfile ++ "In order, the following " ++ wouldWill ++ " be built" ++ - ifNormal " (use -v for more details)" ++ ":") + (showBuildProfile ++ "In order, the following " + ++ wouldWill ++ " be built" + ++ ifNormal " (use -v for more details)" ++ ":") : map showPkgAndReason pkgs where @@ -843,7 +883,8 @@ | (k,v) <- Map.toList (elabInstantiatedWith elab) ] nonDefaultFlags :: ElaboratedConfiguredPackage -> FlagAssignment - nonDefaultFlags elab = elabFlagAssignment elab `diffFlagAssignment` elabFlagDefaults elab + nonDefaultFlags elab = + elabFlagAssignment elab `diffFlagAssignment` elabFlagDefaults elab showStanzas pkg = concat $ [ " *test" @@ -854,8 +895,10 @@ showTargets elab | null (elabBuildTargets elab) = "" | otherwise - = " (" ++ intercalate ", " [ showComponentTarget (packageId elab) t | t <- elabBuildTargets elab ] - ++ ")" + = " (" + ++ intercalate ", " [ showComponentTarget (packageId elab) t + | t <- elabBuildTargets elab ] + ++ ")" showFlagAssignment :: FlagAssignment -> String showFlagAssignment = concatMap ((' ' :) . showFlagValue) . unFlagAssignment @@ -872,8 +915,11 @@ -- rendering. nubFlag :: Eq a => a -> Setup.Flag a -> Setup.Flag a nubFlag x (Setup.Flag x') | x == x' = Setup.NoFlag - nubFlag _ f = f - (tryLibProfiling, tryExeProfiling) = computeEffectiveProfiling fullConfigureFlags + nubFlag _ f = f + + (tryLibProfiling, tryExeProfiling) = + computeEffectiveProfiling fullConfigureFlags + partialConfigureFlags = Mon.mempty { configProf = @@ -907,10 +953,12 @@ BuildReasonEphemeralTargets -> "ephemeral targets" BuildStatusUpToDate {} -> "up to date" -- doesn't happen - showMonitorChangedReason (MonitoredFileChanged file) = "file " ++ file ++ " changed" + showMonitorChangedReason (MonitoredFileChanged file) = + "file " ++ file ++ " changed" showMonitorChangedReason (MonitoredValueChanged _) = "value changed" - showMonitorChangedReason MonitorFirstRun = "first run" - showMonitorChangedReason MonitorCorruptCache = "cannot read state cache" + showMonitorChangedReason MonitorFirstRun = "first run" + showMonitorChangedReason MonitorCorruptCache = + "cannot read state cache" showBuildProfile = "Build profile: " ++ unwords [ "-w " ++ (showCompilerId . pkgConfigCompiler) elaboratedShared, @@ -976,9 +1024,12 @@ | all isHaddockFailure failuresClassification = warn | otherwise = die' where - isHaddockFailure (_, ShowBuildSummaryOnly (HaddocksFailed _) ) = True - isHaddockFailure (_, ShowBuildSummaryAndLog (HaddocksFailed _) _) = True - isHaddockFailure _ = False + isHaddockFailure + (_, ShowBuildSummaryOnly (HaddocksFailed _) ) = True + isHaddockFailure + (_, ShowBuildSummaryAndLog (HaddocksFailed _) _) = True + isHaddockFailure + _ = False classifyBuildFailure :: BuildFailure -> BuildFailurePresentation @@ -998,10 +1049,10 @@ -- context which package failed. -- -- We generalise this rule as follows: - -- - if only one failure occurs, and it is in a single root package (ie a - -- package with nothing else depending on it) - -- - and that failure is of a kind that always reports enough detail - -- itself (e.g. ghc reporting errors on stdout) + -- - if only one failure occurs, and it is in a single root + -- package (i.e. a package with nothing else depending on it) + -- - and that failure is of a kind that always reports enough + -- detail itself (e.g. ghc reporting errors on stdout) -- - then we do not report additional error detail or context. -- isSimpleCase @@ -1062,21 +1113,25 @@ then renderDependencyOf (installedUnitId pkg) else "" - renderFailureExtraDetail reason = - case reason of - ConfigureFailed _ -> " The failure occurred during the configure step." - InstallFailed _ -> " The failure occurred during the final install step." - _ -> "" + renderFailureExtraDetail (ConfigureFailed _) = + " The failure occurred during the configure step." + renderFailureExtraDetail (InstallFailed _) = + " The failure occurred during the final install step." + renderFailureExtraDetail _ = + "" renderDependencyOf pkgid = case ultimateDeps pkgid of [] -> "" - (p1:[]) -> " (which is required by " ++ elabPlanPackageName verbosity p1 ++ ")" - (p1:p2:[]) -> " (which is required by " ++ elabPlanPackageName verbosity p1 - ++ " and " ++ elabPlanPackageName verbosity p2 ++ ")" - (p1:p2:_) -> " (which is required by " ++ elabPlanPackageName verbosity p1 - ++ ", " ++ elabPlanPackageName verbosity p2 - ++ " and others)" + (p1:[]) -> + " (which is required by " ++ elabPlanPackageName verbosity p1 ++ ")" + (p1:p2:[]) -> + " (which is required by " ++ elabPlanPackageName verbosity p1 + ++ " and " ++ elabPlanPackageName verbosity p2 ++ ")" + (p1:p2:_) -> + " (which is required by " ++ elabPlanPackageName verbosity p1 + ++ ", " ++ elabPlanPackageName verbosity p2 + ++ " and others)" showException e = case fromException e of Just (ExitFailure 1) -> "" @@ -1111,9 +1166,10 @@ ++ " which may be because some part of it was killed " ++ "(i.e. SIGKILL). " ++ explanation where - explanation = "The typical reason for this is that there is not " - ++ "enough memory available (e.g. the OS killed a process " - ++ "using lots of memory)." + explanation = + "The typical reason for this is that there is not " + ++ "enough memory available (e.g. the OS killed a process " + ++ "using lots of memory)." #endif Just (ExitFailure n) -> " The build process terminated with exit code " ++ show n diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning/Types.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning/Types.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning/Types.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning/Types.hs 2018-11-27 22:50:00.000000000 +0000 @@ -54,6 +54,8 @@ isTestComponentTarget, isBenchComponentTarget, + componentOptionalStanza, + -- * Setup script SetupScriptStyle(..), ) where @@ -87,10 +89,11 @@ import qualified Distribution.Simple.BuildTarget as Cabal import Distribution.Simple.Program import Distribution.ModuleName (ModuleName) -import Distribution.Simple.LocalBuildInfo (ComponentName(..)) +import Distribution.Simple.LocalBuildInfo + ( ComponentName(..), LibraryName(..) ) import qualified Distribution.Simple.InstallDirs as InstallDirs import Distribution.Simple.InstallDirs (PathTemplate) -import Distribution.Simple.Setup (HaddockTarget) +import Distribution.Simple.Setup (HaddockTarget, TestShowDetails) import Distribution.Version import qualified Distribution.Solver.Types.ComponentDeps as CD @@ -285,6 +288,12 @@ elabHaddockHscolourCss :: Maybe FilePath, elabHaddockContents :: Maybe PathTemplate, + elabTestMachineLog :: Maybe PathTemplate, + elabTestHumanLog :: Maybe PathTemplate, + elabTestShowDetails :: Maybe TestShowDetails, + elabTestKeepTix :: Bool, + elabTestTestOptions :: [PathTemplate], + -- Setup.hs related things: -- | One of four modes for how we build and interact with the Setup.hs @@ -298,6 +307,7 @@ elabSetupScriptCliVersion :: Version, -- Build time related: + elabConfigureTargets :: [ComponentTarget], elabBuildTargets :: [ComponentTarget], elabTestTargets :: [ComponentTarget], elabBenchTargets :: [ComponentTarget], @@ -388,8 +398,7 @@ -- single file is_lib_target (ComponentTarget cn WholeComponent) = is_lib cn is_lib_target _ = False - is_lib CLibName = True - is_lib (CSubLibName _) = True + is_lib (CLibName _) = True is_lib _ = False -- | Construct the environment needed for the data files to work. @@ -460,7 +469,7 @@ elabComponentName :: ElaboratedConfiguredPackage -> Maybe ComponentName elabComponentName elab = case elabPkgOrComp elab of - ElabPackage _ -> Just CLibName -- there could be more, but default this + ElabPackage _ -> Just $ CLibName LMainLibName -- there could be more, but default this ElabComponent comp -> compComponentName comp -- | A user-friendly descriptor for an 'ElaboratedConfiguredPackage'. @@ -472,7 +481,7 @@ ElabComponent comp -> case compComponentName comp of Nothing -> "setup from " - Just CLibName -> "" + Just (CLibName LMainLibName) -> "" Just cname -> display cname ++ " from ") ++ display (packageId elab) | otherwise @@ -776,8 +785,13 @@ isExeComponentTarget _ = False isSubLibComponentTarget :: ComponentTarget -> Bool -isSubLibComponentTarget (ComponentTarget (CSubLibName _) _) = True -isSubLibComponentTarget _ = False +isSubLibComponentTarget (ComponentTarget (CLibName (LSubLibName _)) _) = True +isSubLibComponentTarget _ = False + +componentOptionalStanza :: CD.Component -> Maybe OptionalStanza +componentOptionalStanza (CD.ComponentTest _) = Just TestStanzas +componentOptionalStanza (CD.ComponentBench _) = Just BenchStanzas +componentOptionalStanza _ = Nothing --------------------------- -- Setup.hs script policy @@ -807,4 +821,3 @@ deriving (Eq, Show, Generic, Typeable) instance Binary SetupScriptStyle - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanning.hs 2018-11-27 22:50:00.000000000 +0000 @@ -112,6 +112,10 @@ (InstalledPackageId, installedPackageId) import Distribution.Types.AnnotatedId import Distribution.Types.ComponentName +import Distribution.Types.LibraryName +import Distribution.Types.GivenComponent + (GivenComponent(..)) +import Distribution.Types.PackageVersionConstraint import Distribution.Types.PkgconfigDependency import Distribution.Types.UnqualComponentName import Distribution.System @@ -127,7 +131,7 @@ import Distribution.Simple.Program.Find import qualified Distribution.Simple.Setup as Cabal import Distribution.Simple.Setup - (Flag, toFlag, flagToMaybe, flagToList, fromFlagOrDefault) + (Flag(..), toFlag, flagToMaybe, flagToList, fromFlagOrDefault) import qualified Distribution.Simple.Configure as Cabal import qualified Distribution.Simple.LocalBuildInfo as Cabal import Distribution.Simple.LocalBuildInfo @@ -259,8 +263,7 @@ assert (elabBuildStyle == BuildInplaceOnly || case compComponentName of Nothing -> True - Just CLibName -> True - Just (CSubLibName _) -> True + Just (CLibName _) -> True Just (CExeName _) -> True -- This is interesting: there's no way to declare a dependency -- on a foreign library at the moment, but you may still want @@ -986,7 +989,7 @@ . addPreferences -- preferences from the config file or command line [ PackageVersionPreference name ver - | Dependency name ver <- solverSettingPreferences ] + | PackageVersionConstraint name ver <- solverSettingPreferences ] . addConstraints -- version constraints from the config file or command line @@ -1353,7 +1356,7 @@ -- supported in per-package mode. If this is the case, we should -- give an error when this occurs. checkPerPackageOk comps reasons = do - let is_sublib (CSubLibName _) = True + let is_sublib (CLibName (LSubLibName _)) = True is_sublib _ = False when (any (matchElabPkg is_sublib) comps) $ dieProgress $ @@ -1435,7 +1438,8 @@ compExeDependencyPaths = [ (annotatedIdToConfiguredId aid', path) | aid' <- cc_exe_deps cc0 - , Just path <- [Map.lookup (ann_id aid') exe_map1]] + , Just paths <- [Map.lookup (ann_id aid') exe_map1] + , path <- paths ] elab_comp = ElaboratedComponent {..} -- 3. Construct a preliminary ElaboratedConfiguredPackage, @@ -1520,10 +1524,10 @@ external_exe_dep_sids ++ external_lib_dep_sids external_exe_map = Map.fromList $ - [ (getComponentId pkg, path) + [ (getComponentId pkg, paths) | pkg <- external_exe_dep_pkgs - , Just path <- [planPackageExePath pkg] ] - exe_map1 = Map.union external_exe_map exe_map + , let paths = planPackageExePaths pkg ] + exe_map1 = Map.union external_exe_map $ fmap (\x -> [x]) exe_map external_lib_cc_map = Map.fromListWith Map.union $ map mkCCMapping external_lib_dep_pkgs @@ -1581,26 +1585,37 @@ -- returns at most one result. elaborateLibSolverId :: (SolverId -> [ElaboratedPlanPackage]) -> SolverId -> [ElaboratedPlanPackage] - elaborateLibSolverId mapDep = filter (matchPlanPkg (== CLibName)) . mapDep + elaborateLibSolverId mapDep = filter (matchPlanPkg (== (CLibName LMainLibName))) . mapDep - -- | Given an 'ElaboratedPlanPackage', return the path to where the - -- executable that this package represents would be installed. - planPackageExePath :: ElaboratedPlanPackage -> Maybe FilePath - planPackageExePath = + -- | Given an 'ElaboratedPlanPackage', return the paths to where the + -- executables that this package represents would be installed. + -- The only case where multiple paths can be returned is the inplace + -- monolithic package one, since there can be multiple exes and each one + -- has its own directory. + planPackageExePaths :: ElaboratedPlanPackage -> [FilePath] + planPackageExePaths = -- Pre-existing executables are assumed to be in PATH -- already. In fact, this should be impossible. - InstallPlan.foldPlanPackage (const Nothing) $ \elab -> Just $ - binDirectoryFor - distDirLayout - elaboratedSharedConfig - elab $ - case elabPkgOrComp elab of - ElabPackage _ -> "" - ElabComponent comp -> - case fmap Cabal.componentNameString - (compComponentName comp) of - Just (Just n) -> display n - _ -> "" + InstallPlan.foldPlanPackage (const []) $ \elab -> + let + executables :: [FilePath] + executables = + case elabPkgOrComp elab of + -- Monolithic mode: all exes of the package + ElabPackage _ -> unUnqualComponentName . PD.exeName + <$> PD.executables (elabPkgDescription elab) + -- Per-component mode: just the selected exe + ElabComponent comp -> + case fmap Cabal.componentNameString + (compComponentName comp) of + Just (Just n) -> [display n] + _ -> [""] + in + binDirectoryFor + distDirLayout + elaboratedSharedConfig + elab + <$> executables elaborateSolverToPackage :: SolverPackage UnresolvedPkgLoc -> ComponentsGraph @@ -1625,7 +1640,7 @@ elabModuleShape = modShape } - modShape = case find (matchElabPkg (== CLibName)) comps of + modShape = case find (matchElabPkg (== (CLibName LMainLibName))) comps of Nothing -> emptyModuleShape Just e -> Ty.elabModuleShape e @@ -1665,10 +1680,9 @@ | Graph.N _ cn _ <- fromMaybe [] mb_closure ] where mb_closure = Graph.revClosure compGraph [ k | k <- Graph.keys compGraph, is_lib k ] - is_lib CLibName = True - -- NB: this case should not occur, because sub-libraries + -- NB: the sublib case should not occur, because sub-libraries -- are not supported without per-component builds - is_lib (CSubLibName _) = True + is_lib (CLibName _) = True is_lib _ = False buildComponentDeps f @@ -1769,6 +1783,7 @@ -- but this function doesn't know what is installed (since -- we haven't improved the plan yet), so we do it in another pass. -- Check the comments of those functions for more details. + elabConfigureTargets = [] elabBuildTargets = [] elabTestTargets = [] elabBenchTargets = [] @@ -1860,6 +1875,12 @@ elabHaddockHscolourCss = perPkgOptionMaybe pkgid packageConfigHaddockHscolourCss elabHaddockContents = perPkgOptionMaybe pkgid packageConfigHaddockContents + elabTestMachineLog = perPkgOptionMaybe pkgid packageConfigTestMachineLog + elabTestHumanLog = perPkgOptionMaybe pkgid packageConfigTestHumanLog + elabTestShowDetails = perPkgOptionMaybe pkgid packageConfigTestShowDetails + elabTestKeepTix = perPkgOptionFlag pkgid False packageConfigTestKeepTix + elabTestTestOptions = perPkgOptionList pkgid packageConfigTestTestOptions + perPkgOptionFlag :: PackageId -> a -> (PackageConfig -> Flag a) -> a perPkgOptionMaybe :: PackageId -> (PackageConfig -> Flag a) -> Maybe a perPkgOptionList :: PackageId -> (PackageConfig -> [a]) -> [a] @@ -1927,10 +1948,10 @@ where shouldBeLocal :: PackageSpecifier (SourcePackage (PackageLocation loc)) -> Maybe PackageId shouldBeLocal NamedPackage{} = Nothing - shouldBeLocal (SpecificSourcePackage pkg) + shouldBeLocal (SpecificSourcePackage pkg) | LocalTarballPackage _ <- packageSource pkg = Nothing | otherwise = Just (packageId pkg) - -- TODO: Is it only LocalTarballPackages we can know about without + -- TODO: Is it only LocalTarballPackages we can know about without -- them being "local" in the sense meant here? -- -- Also, review use of SourcePackage's loc vs ProjectPackageLocation @@ -2003,8 +2024,8 @@ ipiComponentName :: IPI.InstalledPackageInfo -> ComponentName ipiComponentName ipkg = case IPI.sourceLibName ipkg of - Nothing -> CLibName - Just n -> (CSubLibName n) + Nothing -> CLibName LMainLibName + Just n -> CLibName (LSubLibName n) -- | Given a 'ElaboratedConfiguredPackage', report if it matches a -- 'ComponentName'. @@ -2333,7 +2354,7 @@ AvailableTarget (UnitId, ComponentName))] availableInstalledTargets ipkg = let unitid = installedUnitId ipkg - cname = CLibName + cname = CLibName LMainLibName status = TargetBuildable (unitid, cname) TargetRequestedByDefault target = AvailableTarget (packageId ipkg) cname status False fake = False @@ -2409,7 +2430,7 @@ componentAvailableTargetStatus :: Component -> AvailableTargetStatus (UnitId, ComponentName) componentAvailableTargetStatus component = - case componentOptionalStanza (componentName component) of + case componentOptionalStanza $ CD.componentNameToComponent cname of -- it is not an optional stanza, so a library, exe or foreign lib Nothing | not buildable -> TargetNotBuildable @@ -2439,7 +2460,7 @@ compComponentName elabComponent == Just cname ElabPackage _ -> case componentName component of - CLibName -> True + CLibName (LMainLibName) -> True CExeName _ -> True --TODO: what about sub-libs and foreign libs? _ -> False @@ -2511,7 +2532,8 @@ -- | How 'pruneInstallPlanToTargets' should interpret the per-package -- 'ComponentTarget's: as build, repl or haddock targets. -- -data TargetAction = TargetActionBuild +data TargetAction = TargetActionConfigure + | TargetActionBuild | TargetActionRepl | TargetActionTest | TargetActionBench @@ -2584,6 +2606,7 @@ case (Map.lookup (installedUnitId elab) perPkgTargetsMap, targetAction) of (Nothing, _) -> elab + (Just tgts, TargetActionConfigure) -> elab { elabConfigureTargets = tgts } (Just tgts, TargetActionBuild) -> elab { elabBuildTargets = tgts } (Just tgts, TargetActionTest) -> elab { elabTestTargets = tgts } (Just tgts, TargetActionBench) -> elab { elabBenchTargets = tgts } @@ -2628,11 +2651,13 @@ $ addOptionalStanzas elab find_root (InstallPlan.Configured (PrunedPackage elab _)) = - if not (null (elabBuildTargets elab) - && null (elabTestTargets elab) - && null (elabBenchTargets elab) - && isNothing (elabReplTarget elab) - && null (elabHaddockTargets elab)) + if not $ and [ null (elabConfigureTargets elab) + , null (elabBuildTargets elab) + , null (elabTestTargets elab) + , null (elabBenchTargets elab) + , isNothing (elabReplTarget elab) + , null (elabHaddockTargets elab) + ] then Just (installedUnitId elab) else Nothing find_root _ = Nothing @@ -2725,7 +2750,9 @@ ++ elabBenchTargets pkg ++ maybeToList (elabReplTarget pkg) ++ elabHaddockTargets pkg - , stanza <- maybeToList (componentOptionalStanza cname) + , stanza <- maybeToList $ + componentOptionalStanza $ + CD.componentNameToComponent cname ] availablePkgs = @@ -2816,7 +2843,7 @@ } where libTargetsRequiredForRevDeps = - [ ComponentTarget Cabal.defaultLibName WholeComponent + [ ComponentTarget (CLibName Cabal.defaultLibName) WholeComponent | installedUnitId elab `Set.member` hasReverseLibDeps ] exeTargetsRequiredForRevDeps = @@ -2855,11 +2882,6 @@ mapConfiguredPackage _ (InstallPlan.PreExisting pkg) = InstallPlan.PreExisting pkg -componentOptionalStanza :: Cabal.ComponentName -> Maybe OptionalStanza -componentOptionalStanza (Cabal.CTestName _) = Just TestStanzas -componentOptionalStanza (Cabal.CBenchName _) = Just BenchStanzas -componentOptionalStanza _ = Nothing - ------------------------------------ -- Support for --only-dependencies -- @@ -3000,9 +3022,9 @@ -- of other packages. SetupCustomImplicitDeps -> Just $ - [ Dependency depPkgname anyVersion + [ Dependency depPkgname anyVersion (Set.singleton LMainLibName) | depPkgname <- legacyCustomSetupPkgs compiler platform ] ++ - [ Dependency cabalPkgname cabalConstraint + [ Dependency cabalPkgname cabalConstraint (Set.singleton LMainLibName) | packageName pkg /= cabalPkgname ] where -- The Cabal dep is slightly special: @@ -3025,8 +3047,8 @@ -- external Setup.hs, it'll be one of the simple ones that only depends -- on Cabal and base. SetupNonCustomExternalLib -> - Just [ Dependency cabalPkgname cabalConstraint - , Dependency basePkgname anyVersion ] + Just [ Dependency cabalPkgname cabalConstraint (Set.singleton LMainLibName) + , Dependency basePkgname anyVersion (Set.singleton LMainLibName)] where cabalConstraint = orLaterVersion (PD.specVersion pkg) @@ -3127,7 +3149,7 @@ usePackageDB = elabSetupPackageDBStack, usePackageIndex = Nothing, useDependencies = [ (uid, srcid) - | ConfiguredId srcid (Just CLibName) uid + | ConfiguredId srcid (Just (CLibName LMainLibName)) uid <- elabSetupDependencies elab ], useDependenciesExclusive = True, useVersionMacros = elabSetupScriptStyle == SetupCustomExplicitDeps, @@ -3286,14 +3308,16 @@ -- NB: This does NOT use InstallPlan.depends, which includes executable -- dependencies which should NOT be fed in here (also you don't have -- enough info anyway) - configDependencies = [ (case mb_cn of - -- Special case for internal libraries - Just (CSubLibName uqn) - | packageId elab == srcid - -> mkPackageName (unUnqualComponentName uqn) - _ -> packageName srcid, - cid) - | ConfiguredId srcid mb_cn cid <- elabLibDependencies elab ] + configDependencies = [ GivenComponent + (packageName srcid) + ln + cid + | ConfiguredId srcid mb_cn cid <- elabLibDependencies elab + , let ln = case mb_cn + of Just (CLibName lname) -> lname + Just _ -> error "non-library dependency" + Nothing -> LMainLibName + ] configConstraints = case elabPkgOrComp of ElabPackage _ -> @@ -3363,14 +3387,14 @@ -> Verbosity -> FilePath -> Cabal.TestFlags -setupHsTestFlags _ _ verbosity builddir = Cabal.TestFlags +setupHsTestFlags (ElaboratedConfiguredPackage{..}) _ verbosity builddir = Cabal.TestFlags { testDistPref = toFlag builddir , testVerbosity = toFlag verbosity - , testMachineLog = mempty - , testHumanLog = mempty - , testShowDetails = toFlag Cabal.Always - , testKeepTix = mempty - , testOptions = mempty + , testMachineLog = maybe mempty toFlag elabTestMachineLog + , testHumanLog = maybe mempty toFlag elabTestHumanLog + , testShowDetails = maybe (Flag Cabal.Always) toFlag elabTestShowDetails + , testKeepTix = toFlag elabTestKeepTix + , testOptions = elabTestTestOptions } setupHsTestArgs :: ElaboratedConfiguredPackage -> [String] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanOutput.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanOutput.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanOutput.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/ProjectPlanOutput.hs 2018-11-27 22:50:00.000000000 +0000 @@ -19,7 +19,7 @@ import Distribution.Client.ProjectBuilding.Types import Distribution.Client.DistDirLayout import Distribution.Client.Types (Repo(..), RemoteRepo(..), PackageLocation(..), confInstId) -import Distribution.Client.PackageHash (showHashValue) +import Distribution.Client.PackageHash (showHashValue, hashValue) import qualified Distribution.Client.InstallPlan as InstallPlan import qualified Distribution.Client.Utils.Json as J @@ -141,6 +141,8 @@ , "style" J..= J.String (style2str (elabLocalToProject elab) (elabBuildStyle elab)) , "pkg-src" J..= packageLocationToJ (elabPkgSourceLocation elab) ] ++ + [ "pkg-cabal-sha256" J..= J.String (showHashValue hash) + | Just hash <- [ fmap hashValue (elabPkgDescriptionOverride elab) ] ] ++ [ "pkg-src-sha256" J..= J.String (showHashValue hash) | Just hash <- [elabPkgSourceHash elab] ] ++ (case elabBuildStyle elab of @@ -155,7 +157,8 @@ let components = J.object $ [ comp2str c J..= (J.object $ [ "depends" J..= map (jdisplay . confInstId) ldeps - , "exe-depends" J..= map (jdisplay . confInstId) edeps ] ++ + , "exe-depends" J..= map (jdisplay . confInstId) edeps + ] ++ bin_file c) | (c,(ldeps,edeps)) <- ComponentDeps.toList $ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Sandbox.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Sandbox.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Sandbox.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Sandbox.hs 2018-11-27 22:50:00.000000000 +0000 @@ -91,6 +91,7 @@ import Distribution.Simple.PreProcess ( knownSuffixHandlers ) import Distribution.Simple.Program ( ProgramDb ) import Distribution.Simple.Setup ( Flag(..), HaddockFlags(..) + , emptyTestFlags , fromFlagOrDefault, flagToMaybe ) import Distribution.Simple.SrcDist ( prepareTree ) import Distribution.Simple.Utils ( die', debug, notice, info, warn @@ -684,7 +685,7 @@ ,comp, platform, progdb ,UseSandbox sandboxDir, Just sandboxPkgInfo ,globalFlags, configFlags, configExFlags, installFlags - ,haddockFlags) + ,haddockFlags, emptyTestFlags) -- This can actually be replaced by a call to 'install', but we use a -- lower-level API because of layer separation reasons. Additionally, we diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Setup.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Setup.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Setup.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Setup.hs 2018-11-27 22:50:00.000000000 +0000 @@ -1,7 +1,8 @@ {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Setup @@ -21,7 +22,7 @@ , configPackageDB', configCompilerAux' , configureExCommand, ConfigExFlags(..), defaultConfigExFlags , buildCommand, BuildFlags(..), BuildExFlags(..), SkipAddSourceDepsCheck(..) - , replCommand, testCommand, benchmarkCommand + , replCommand, testCommand, benchmarkCommand, testOptions , configureExOptions, reconfigureCommand , installCommand, InstallFlags(..), installOptions, defaultInstallFlags , filterHaddockArgs, filterHaddockFlags @@ -57,6 +58,7 @@ , parsePackageArgs , liftOptions + , yesNoOpt --TODO: stop exporting these: , showRepo , parseRepo @@ -69,6 +71,7 @@ import Distribution.Client.Types ( Username(..), Password(..), RemoteRepo(..) , AllowNewer(..), AllowOlder(..), RelaxDeps(..) + , WriteGhcEnvironmentFilesPolicy(..) ) import Distribution.Client.BuildReports.Types ( ReportLevel(..) ) @@ -95,7 +98,7 @@ import qualified Distribution.Simple.Setup as Cabal import Distribution.Simple.Setup ( ConfigFlags(..), BuildFlags(..), ReplFlags - , TestFlags(..), BenchmarkFlags(..) + , TestFlags, BenchmarkFlags(..) , SDistFlags(..), HaddockFlags(..) , CleanFlags(..), DoctestFlags(..) , CopyFlags(..), RegisterFlags(..) @@ -110,10 +113,16 @@ import Distribution.Version ( Version, mkVersion, nullVersion, anyVersion, thisVersion ) import Distribution.Package - ( PackageIdentifier, PackageName, packageName, packageVersion ) + ( PackageName, PackageIdentifier, packageName, packageVersion ) import Distribution.Types.Dependency +import Distribution.Types.GivenComponent + ( GivenComponent(..) ) +import Distribution.Types.PackageVersionConstraint + ( PackageVersionConstraint(..) ) +import Distribution.Types.UnqualComponentName + ( unqualComponentNameToPackageName ) import Distribution.PackageDescription - ( BuildType(..), RepoKind(..) ) + ( BuildType(..), RepoKind(..), LibraryName(..) ) import Distribution.System ( Platform ) import Distribution.Text ( Text(..), display ) @@ -134,6 +143,7 @@ import Data.List ( deleteFirstsBy ) +import qualified Data.Set as Set import System.FilePath ( () ) import Network.URI @@ -495,7 +505,7 @@ filterConfigureFlags flags cabalLibVersion -- NB: we expect the latest version to be the most common case, -- so test it first. - | cabalLibVersion >= mkVersion [2,1,0] = flags_latest + | cabalLibVersion >= mkVersion [2,3,0] = flags_latest -- The naming convention is that flags_version gives flags with -- all flags *introduced* in version eliminated. -- It is NOT the latest version of Cabal library that @@ -513,6 +523,7 @@ | cabalLibVersion < mkVersion [1,23,0] = flags_1_23_0 | cabalLibVersion < mkVersion [1,25,0] = flags_1_25_0 | cabalLibVersion < mkVersion [2,1,0] = flags_2_1_0 + | cabalLibVersion < mkVersion [2,5,0] = flags_2_5_0 | otherwise = flags_latest where flags_latest = flags { @@ -523,7 +534,22 @@ configConstraints = [] } - flags_2_1_0 = flags_latest { + flags_2_5_0 = flags_latest { + -- Cabal < 2.5.0 does not understand --dependency=pkg:component=cid + -- (public sublibraries), so we convert it to the legacy + -- --dependency=pkg_or_internal_compoent=cid + configDependencies = + let convertToLegacyInternalDep (GivenComponent _ (LSubLibName cn) cid) = + Just $ GivenComponent + (unqualComponentNameToPackageName cn) + LMainLibName + cid + convertToLegacyInternalDep (GivenComponent pn LMainLibName cid) = + Just $ GivenComponent pn LMainLibName cid + in catMaybes $ convertToLegacyInternalDep <$> configDependencies flags + } + + flags_2_1_0 = flags_2_5_0 { -- Cabal < 2.1 doesn't know about -v +timestamp modifier configVerbosity = fmap verboseNoTimestamp (configVerbosity flags_latest) -- Cabal < 2.1 doesn't know about ---static @@ -613,12 +639,14 @@ -- | cabal configure takes some extra flags beyond runghc Setup configure -- data ConfigExFlags = ConfigExFlags { - configCabalVersion :: Flag Version, - configExConstraints:: [(UserConstraint, ConstraintSource)], - configPreferences :: [Dependency], - configSolver :: Flag PreSolver, - configAllowNewer :: Maybe AllowNewer, - configAllowOlder :: Maybe AllowOlder + configCabalVersion :: Flag Version, + configExConstraints :: [(UserConstraint, ConstraintSource)], + configPreferences :: [PackageVersionConstraint], + configSolver :: Flag PreSolver, + configAllowNewer :: Maybe AllowNewer, + configAllowOlder :: Maybe AllowOlder, + configWriteGhcEnvironmentFilesPolicy + :: Flag WriteGhcEnvironmentFilesPolicy } deriving (Eq, Generic) @@ -683,9 +711,34 @@ (readP_to_E ("Cannot parse the list of packages: " ++) relaxDepsParser) (Just RelaxDepsAll) relaxDepsPrinter) + , option [] ["write-ghc-environment-files"] + ("Whether to create a .ghc.environment file after a successful build" + ++ " (v2-build only)") + configWriteGhcEnvironmentFilesPolicy + (\v flags -> flags { configWriteGhcEnvironmentFilesPolicy = v}) + (reqArg "always|never|ghc8.4.4+" + writeGhcEnvironmentFilesPolicyParser + writeGhcEnvironmentFilesPolicyPrinter) ] +writeGhcEnvironmentFilesPolicyParser :: ReadE (Flag WriteGhcEnvironmentFilesPolicy) +writeGhcEnvironmentFilesPolicyParser = ReadE $ \case + "always" -> Right $ Flag AlwaysWriteGhcEnvironmentFiles + "never" -> Right $ Flag NeverWriteGhcEnvironmentFiles + "ghc8.4.4+" -> Right $ Flag WriteGhcEnvironmentFilesOnlyForGhc844AndNewer + policy -> Left $ "Cannot parse the GHC environment file write policy '" + <> policy <> "'" + +writeGhcEnvironmentFilesPolicyPrinter + :: Flag WriteGhcEnvironmentFilesPolicy -> [String] +writeGhcEnvironmentFilesPolicyPrinter = \case + (Flag AlwaysWriteGhcEnvironmentFiles) -> ["always"] + (Flag NeverWriteGhcEnvironmentFiles) -> ["never"] + (Flag WriteGhcEnvironmentFilesOnlyForGhc844AndNewer) -> ["ghc8.4.4+"] + NoFlag -> [] + + relaxDepsParser :: Parse.ReadP r (Maybe RelaxDeps) relaxDepsParser = (Just . RelaxDepsSome) `fmap` Parse.sepBy1 parse (Parse.char ',') @@ -1282,13 +1335,13 @@ -- * Other commands -- ------------------------------------------------------------ -upgradeCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +upgradeCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) upgradeCommand = configureCommand { commandName = "upgrade", commandSynopsis = "(command disabled, use install instead)", commandDescription = Nothing, commandUsage = usageFlagsOrPackages "upgrade", - commandDefaultFlags = (mempty, mempty, mempty, mempty), + commandDefaultFlags = (mempty, mempty, mempty, mempty, mempty), commandOptions = commandOptions installCommand } @@ -1741,7 +1794,7 @@ allSolvers :: String allSolvers = intercalate ", " (map display ([minBound .. maxBound] :: [PreSolver])) -installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) installCommand = CommandUI { commandName = "install", commandSynopsis = "Install packages.", @@ -1794,7 +1847,7 @@ ++ " " ++ (map (const ' ') pname) ++ " " ++ " Change installation destination\n", - commandDefaultFlags = (mempty, mempty, mempty, mempty), + commandDefaultFlags = (mempty, mempty, mempty, mempty, mempty), commandOptions = \showOrParseArgs -> liftOptions get1 set1 -- Note: [Hidden Flags] @@ -1812,12 +1865,14 @@ . optionName) $ installOptions showOrParseArgs) ++ liftOptions get4 set4 (haddockOptions showOrParseArgs) + ++ liftOptions get5 set5 (testOptions showOrParseArgs) } where - get1 (a,_,_,_) = a; set1 a (_,b,c,d) = (a,b,c,d) - get2 (_,b,_,_) = b; set2 b (a,_,c,d) = (a,b,c,d) - get3 (_,_,c,_) = c; set3 c (a,b,_,d) = (a,b,c,d) - get4 (_,_,_,d) = d; set4 d (a,b,c,_) = (a,b,c,d) + get1 (a,_,_,_,_) = a; set1 a (_,b,c,d,e) = (a,b,c,d,e) + get2 (_,b,_,_,_) = b; set2 b (a,_,c,d,e) = (a,b,c,d,e) + get3 (_,_,c,_,_) = c; set3 c (a,b,_,d,e) = (a,b,c,d,e) + get4 (_,_,_,d,_) = d; set4 d (a,b,c,_,e) = (a,b,c,d,e) + get5 (_,_,_,_,e) = e; set5 e (a,b,c,d,_) = (a,b,c,d,e) haddockCommand :: CommandUI HaddockFlags haddockCommand = Cabal.haddockCommand @@ -1861,12 +1916,26 @@ ,"hyperlink-source", "quickjump", "hscolour-css" ,"contents-location", "for-hackage"] ] + +testOptions :: ShowOrParseArgs -> [OptionField TestFlags] +testOptions showOrParseArgs + = [ opt { optionName = prefixTest name, + optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map prefixTest lflags)) descr + | descr <- optionDescr opt] } + | opt <- commandOptions Cabal.testCommand showOrParseArgs + , let name = optionName opt + , name `elem` ["log", "machine-log", "show-details", "keep-tix-files" + ,"test-options", "test-option"] + ] where - fmapOptFlags :: (OptFlags -> OptFlags) -> OptDescr a -> OptDescr a - fmapOptFlags modify (ReqArg d f p r w) = ReqArg d (modify f) p r w - fmapOptFlags modify (OptArg d f p r i w) = OptArg d (modify f) p r i w - fmapOptFlags modify (ChoiceOpt xs) = ChoiceOpt [(d, modify f, i, w) | (d, f, i, w) <- xs] - fmapOptFlags modify (BoolOpt d f1 f2 r w) = BoolOpt d (modify f1) (modify f2) r w + prefixTest name | "test-" `isPrefixOf` name = name + | otherwise = "test-" ++ name + +fmapOptFlags :: (OptFlags -> OptFlags) -> OptDescr a -> OptDescr a +fmapOptFlags modify (ReqArg d f p r w) = ReqArg d (modify f) p r w +fmapOptFlags modify (OptArg d f p r i w) = OptArg d (modify f) p r i w +fmapOptFlags modify (ChoiceOpt xs) = ChoiceOpt [(d, modify f, i, w) | (d, f, i, w) <- xs] +fmapOptFlags modify (BoolOpt d f1 f2 r w) = BoolOpt d (modify f1) (modify f2) r w installOptions :: ShowOrParseArgs -> [OptionField InstallFlags] installOptions showOrParseArgs = @@ -2295,6 +2364,14 @@ (reqArg' "TOOL" (Just . (:[])) (fromMaybe [])) + -- NB: this is a bit of a transitional hack and will likely be + -- removed again if `cabal init` is migrated to the v2-* command + -- framework + , option "w" ["with-compiler"] + "give the path to a particular compiler" + IT.initHcPath (\v flags -> flags { IT.initHcPath = v }) + (reqArgFlag "PATH") + , optionVerbosity IT.initVerbosity (\v flags -> flags { IT.initVerbosity = v }) ] } @@ -2697,6 +2774,7 @@ ] } + -- ------------------------------------------------------------ -- * GetOpt Utils -- ------------------------------------------------------------ @@ -2813,8 +2891,8 @@ where pkgidToDependency :: PackageIdentifier -> Dependency pkgidToDependency p = case packageVersion p of - v | v == nullVersion -> Dependency (packageName p) anyVersion - | otherwise -> Dependency (packageName p) (thisVersion v) + v | v == nullVersion -> Dependency (packageName p) anyVersion (Set.singleton LMainLibName) + | otherwise -> Dependency (packageName p) (thisVersion v) (Set.singleton LMainLibName) showRepo :: RemoteRepo -> String showRepo repo = remoteRepoName repo ++ ":" diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/SetupWrapper.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/SetupWrapper.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/SetupWrapper.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/SetupWrapper.hs 2018-11-27 22:50:00.000000000 +0000 @@ -36,7 +36,6 @@ ( newSimpleUnitId, unsafeMkDefUnitId, ComponentId , PackageId, mkPackageName , PackageIdentifier(..), packageVersion, packageName ) -import Distribution.Types.Dependency import Distribution.PackageDescription ( GenericPackageDescription(packageDescription) , PackageDescription(..), specVersion, buildType @@ -128,11 +127,11 @@ -- | @Setup@ encapsulates the outcome of configuring a setup method to build a -- particular package. -data Setup = Setup { setupMethod :: SetupMethod +data Setup = Setup { setupMethod :: SetupMethod , setupScriptOptions :: SetupScriptOptions - , setupVersion :: Version - , setupBuildType :: BuildType - , setupPackage :: PackageDescription + , setupVersion :: Version + , setupBuildType :: BuildType + , setupPackage :: PackageDescription } -- | @SetupMethod@ represents one of the methods used to run Cabal commands. @@ -719,10 +718,10 @@ return (packageVersion pkg, Nothing, options') installedCabalVersion options' compiler progdb = do index <- maybeGetInstalledPackages options' compiler progdb - let cabalDep = Dependency (mkPackageName "Cabal") - (useCabalVersion options') - options'' = options' { usePackageIndex = Just index } - case PackageIndex.lookupDependency index cabalDep of + let cabalDepName = mkPackageName "Cabal" + cabalDepVersion = useCabalVersion options' + options'' = options' { usePackageIndex = Just index } + case PackageIndex.lookupDependency index cabalDepName cabalDepVersion of [] -> die' verbosity $ "The package '" ++ display (packageName pkg) ++ "' requires Cabal library version " ++ display (useCabalVersion options) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/TargetSelector.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/TargetSelector.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/TargetSelector.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/TargetSelector.hs 2018-11-27 22:50:00.000000000 +0000 @@ -61,7 +61,7 @@ import Distribution.ModuleName ( ModuleName, toFilePath ) import Distribution.Simple.LocalBuildInfo - ( Component(..), ComponentName(..) + ( Component(..), ComponentName(..), LibraryName(..) , pkgComponents, componentName, componentBuildInfo ) import Distribution.Types.ForeignLib @@ -552,8 +552,7 @@ go (TargetPackageNamed _ (Just filter')) = kfilter == filter' go (TargetAllPackages (Just filter')) = kfilter == filter' go (TargetComponent _ cname _) - | CLibName <- cname = kfilter == LibKind - | CSubLibName _ <- cname = kfilter == LibKind + | CLibName _ <- cname = kfilter == LibKind | CFLibName _ <- cname = kfilter == FLibKind | CExeName _ <- cname = kfilter == ExeKind | CTestName _ <- cname = kfilter == TestKind @@ -1183,7 +1182,7 @@ KnownPackageName pn -> do m <- matchModuleNameUnknown str2 -- We assume the primary library component of the package: - return (TargetComponentUnknown pn (Right CLibName) (ModuleTarget m)) + return (TargetComponentUnknown pn (Right $ CLibName LMainLibName) (ModuleTarget m)) where render (TargetComponent p _c (ModuleTarget m)) = [TargetStringFileStatus2 (dispP p) noFileStatus (dispM m)] @@ -1228,7 +1227,7 @@ KnownPackageName pn -> let filepath = str2 in -- We assume the primary library component of the package: - return (TargetComponentUnknown pn (Right CLibName) (FileTarget filepath)) + return (TargetComponentUnknown pn (Right $ CLibName LMainLibName) (FileTarget filepath)) where render (TargetComponent p _c (FileTarget f)) = [TargetStringFileStatus2 (dispP p) noFileStatus f] @@ -1799,8 +1798,8 @@ componentStringName :: PackageName -> ComponentName -> ComponentStringName -componentStringName pkgname CLibName = display pkgname -componentStringName _ (CSubLibName name) = unUnqualComponentName name +componentStringName pkgname (CLibName LMainLibName) = display pkgname +componentStringName _ (CLibName (LSubLibName name)) = unUnqualComponentName name componentStringName _ (CFLibName name) = unUnqualComponentName name componentStringName _ (CExeName name) = unUnqualComponentName name componentStringName _ (CTestName name) = unUnqualComponentName name @@ -1859,8 +1858,7 @@ -- componentKind :: ComponentName -> ComponentKind -componentKind CLibName = LibKind -componentKind (CSubLibName _) = LibKind +componentKind (CLibName _) = LibKind componentKind (CFLibName _) = FLibKind componentKind (CExeName _) = ExeKind componentKind (CTestName _) = TestKind @@ -2390,8 +2388,8 @@ case ckind of LibKind | packageNameToUnqualComponentName pkgname == ucname - -> CLibName - | otherwise -> CSubLibName ucname + -> CLibName LMainLibName + | otherwise -> CLibName $ LSubLibName ucname FLibKind -> CFLibName ucname ExeKind -> CExeName ucname TestKind -> CTestName ucname diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Targets.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Targets.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Targets.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Targets.hs 2018-11-27 22:50:00.000000000 +0000 @@ -54,6 +54,7 @@ ( Package(..), PackageName, unPackageName, mkPackageName , PackageIdentifier(..), packageName, packageVersion ) import Distribution.Types.Dependency +import Distribution.Types.LibraryName import Distribution.Client.Types ( PackageLocation(..), ResolvedPkgLoc, UnresolvedSourcePackage , PackageSpecifier(..) ) @@ -91,6 +92,7 @@ import Data.Either ( partitionEithers ) import qualified Data.Map as Map +import qualified Data.Set as Set import qualified Data.ByteString.Lazy as BS import qualified Distribution.Client.GZipUtils as GZipUtils import Control.Monad (mapM) @@ -187,7 +189,7 @@ readUserTarget :: String -> IO (Either UserTargetProblem UserTarget) readUserTarget targetstr = case testNamedTargets targetstr of - Just (Dependency pkgn verrange) + Just (Dependency pkgn verrange _) | pkgn == mkPackageName "world" -> return $ if verrange == anyVersion then Right UserTargetWorld @@ -255,8 +257,8 @@ where pkgidToDependency :: PackageIdentifier -> Dependency pkgidToDependency p = case packageVersion p of - v | v == nullVersion -> Dependency (packageName p) anyVersion - | otherwise -> Dependency (packageName p) (thisVersion v) + v | v == nullVersion -> Dependency (packageName p) anyVersion (Set.singleton LMainLibName) + | otherwise -> Dependency (packageName p) (thisVersion v) (Set.singleton LMainLibName) reportUserTargetProblems :: Verbosity -> [UserTargetProblem] -> IO () @@ -376,7 +378,7 @@ -> IO [PackageTarget (PackageLocation ())] expandUserTarget verbosity worldFile userTarget = case userTarget of - UserTargetNamed (Dependency name vrange) -> + UserTargetNamed (Dependency name vrange _cs) -> let props = [ PackagePropertyVersion vrange | not (isAnyVersion vrange) ] in return [PackageTargetNamedFuzzy name props userTarget] @@ -385,7 +387,7 @@ worldPkgs <- World.getContents verbosity worldFile --TODO: should we warn if there are no world targets? return [ PackageTargetNamed name props userTarget - | World.WorldPkgInfo (Dependency name vrange) flags <- worldPkgs + | World.WorldPkgInfo (Dependency name vrange _) flags <- worldPkgs , let props = [ PackagePropertyVersion vrange | not (isAnyVersion vrange) ] ++ [ PackagePropertyFlags flags diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Types.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Types.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Types.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Types.hs 2018-11-27 22:50:00.000000000 +0000 @@ -46,6 +46,8 @@ ( PackageName, mkPackageName ) import Distribution.Types.ComponentName ( ComponentName(..) ) +import Distribution.Types.LibraryName + ( LibraryName(..) ) import Distribution.Types.SourceRepo ( SourceRepo ) @@ -129,7 +131,7 @@ -- 'ElaboratedPackage' and 'ElaboratedComponent'. -- instance HasConfiguredId (ConfiguredPackage loc) where - configuredId pkg = ConfiguredId (packageId pkg) (Just CLibName) (confPkgId pkg) + configuredId pkg = ConfiguredId (packageId pkg) (Just (CLibName LMainLibName)) (confPkgId pkg) -- 'ConfiguredPackage' is the legacy codepath, we are guaranteed -- to never have a nontrivial 'UnitId' @@ -589,3 +591,19 @@ instance Monoid AllowOlder where mempty = AllowOlder mempty mappend = (<>) + +-- ------------------------------------------------------------ +-- * --write-ghc-environment-file +-- ------------------------------------------------------------ + +-- | Whether 'v2-build' should write a .ghc.environment file after +-- success. Possible values: 'always', 'never', 'ghc8.4.4+' (the +-- default; GHC 8.4.4 is the earliest version that supports +-- '-package-env -'). +data WriteGhcEnvironmentFilesPolicy + = AlwaysWriteGhcEnvironmentFiles + | NeverWriteGhcEnvironmentFiles + | WriteGhcEnvironmentFilesOnlyForGhc844AndNewer + deriving (Eq, Enum, Bounded, Generic, Show) + +instance Binary WriteGhcEnvironmentFilesPolicy diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Utils/Parsec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Utils/Parsec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/Utils/Parsec.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/Utils/Parsec.hs 2018-11-27 22:50:00.000000000 +0000 @@ -0,0 +1,102 @@ +module Distribution.Client.Utils.Parsec ( + renderParseError, + ) where + +import Distribution.Client.Compat.Prelude +import Prelude () +import System.FilePath (normalise) + +import qualified Data.ByteString as BS +import qualified Data.ByteString.Char8 as BS8 + +import Distribution.Parsec.Common (PError (..), PWarning (..), Position (..), showPos, zeroPos) +import Distribution.Simple.Utils (fromUTF8BS) + +-- | Render parse error highlighting the part of the input file. +renderParseError + :: FilePath + -> BS.ByteString + -> [PError] + -> [PWarning] + -> String +renderParseError filepath contents errors warnings = unlines $ + [ "Errors encountered when parsing cabal file " <> filepath <> ":" + ] + ++ renderedErrors + ++ renderedWarnings + where + filepath' = normalise filepath + + -- lines of the input file. 'lines' is taken, so they are called rows + -- contents, line number, whether it's empty line + rows :: [(String, Int, Bool)] + rows = zipWith f (BS8.lines contents) [1..] where + f bs i = let s = fromUTF8BS bs in (s, i, isEmptyOrComment s) + + rowsZipper = listToZipper rows + + isEmptyOrComment :: String -> Bool + isEmptyOrComment s = case dropWhile (== ' ') s of + "" -> True -- empty + ('-':'-':_) -> True -- comment + _ -> False + + renderedErrors = concatMap renderError errors + renderedWarnings = concatMap renderWarning warnings + + renderError :: PError -> [String] + renderError (PError pos@(Position row col) msg) + -- if position is 0:0, then it doesn't make sense to show input + -- looks like, Parsec errors have line-feed in them + | pos == zeroPos = msgs + | otherwise = msgs ++ formatInput row col + where + msgs = [ "", filepath' ++ ":" ++ showPos pos ++ ": error:", trimLF msg, "" ] + + renderWarning :: PWarning -> [String] + renderWarning (PWarning _ pos@(Position row col) msg) + | pos == zeroPos = msgs + | otherwise = msgs ++ formatInput row col + where + msgs = [ "", filepath' ++ ":" ++ showPos pos ++ ": warning:", trimLF msg, "" ] + + -- sometimes there are (especially trailing) newlines. + trimLF :: String -> String + trimLF = dropWhile (== '\n') . reverse . dropWhile (== '\n') . reverse + + -- format line: prepend the given line number + formatInput :: Int -> Int -> [String] + formatInput row col = case advance (row - 1) rowsZipper of + Zipper xs ys -> before ++ after where + before = case span (\(_, _, b) -> b) xs of + (_, []) -> [] + (zs, z : _) -> map formatInputLine $ z : reverse zs + + after = case ys of + [] -> [] + (z : _zs) -> + [ formatInputLine z -- error line + , " | " ++ replicate (col - 1) ' ' ++ "^" -- pointer: ^ + ] + -- do we need rows after? + -- ++ map formatInputLine (take 1 zs) -- one row after + + formatInputLine :: (String, Int, Bool) -> String + formatInputLine (str, row, _) = leftPadShow row ++ " | " ++ str + + -- hopefully we don't need to work with over 99999 lines .cabal files + -- at that point small glitches in error messages are hopefully fine. + leftPadShow :: Int -> String + leftPadShow n = let s = show n in replicate (5 - length s) ' ' ++ s + +data Zipper a = Zipper [a] [a] + +listToZipper :: [a] -> Zipper a +listToZipper = Zipper [] + +advance :: Int -> Zipper a -> Zipper a +advance n z@(Zipper xs ys) + | n <= 0 = z + | otherwise = case ys of + [] -> z + (y:ys') -> advance (n - 1) $ Zipper (y:xs) ys' diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/World.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/World.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Client/World.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Client/World.hs 2018-11-27 22:50:00.000000000 +0000 @@ -74,8 +74,8 @@ -- | WorldPkgInfo values are considered equal if they refer to -- the same package, i.e., we don't care about differing versions or flags. equalUDep :: WorldPkgInfo -> WorldPkgInfo -> Bool -equalUDep (WorldPkgInfo (Dependency pkg1 _) _) - (WorldPkgInfo (Dependency pkg2 _) _) = pkg1 == pkg2 +equalUDep (WorldPkgInfo (Dependency pkg1 _ _) _) + (WorldPkgInfo (Dependency pkg2 _ _) _) = pkg1 == pkg2 -- | Modifies the world file by applying an update-function ('unionBy' -- for 'insert', 'deleteFirstsBy' for 'delete') to the given list of diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Modular/IndexConversion.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Modular/IndexConversion.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Modular/IndexConversion.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Modular/IndexConversion.hs 2018-11-27 22:50:01.000000000 +0000 @@ -335,7 +335,7 @@ -- | Convenience function to delete a 'Dependency' if it's -- for a 'PN' that isn't actually real. filterIPNs :: IPNs -> Dependency -> Maybe Dependency -filterIPNs ipns d@(Dependency pn _) +filterIPNs ipns d@(Dependency pn _ _) | S.notMember pn ipns = Just d | otherwise = Nothing @@ -562,7 +562,7 @@ -- | Convert a Cabal dependency on a library to a solver-specific dependency. convLibDep :: DependencyReason PN -> Dependency -> LDep PN -convLibDep dr (Dependency pn vr) = LDep dr $ Dep (PkgComponent pn ExposedLib) (Constrained vr) +convLibDep dr (Dependency pn vr _) = LDep dr $ Dep (PkgComponent pn ExposedLib) (Constrained vr) -- | Convert a Cabal dependency on an executable (build-tools) to a solver-specific dependency. convExeDep :: DependencyReason PN -> ExeDependency -> LDep PN diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Types/ComponentDeps.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Types/ComponentDeps.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Types/ComponentDeps.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Types/ComponentDeps.hs 2018-11-27 22:50:01.000000000 +0000 @@ -44,6 +44,7 @@ import Data.Foldable (fold) import qualified Distribution.Types.ComponentName as CN +import qualified Distribution.Types.LibraryName as LN {------------------------------------------------------------------------------- Types @@ -90,12 +91,12 @@ instance Binary a => Binary (ComponentDeps a) componentNameToComponent :: CN.ComponentName -> Component -componentNameToComponent (CN.CLibName) = ComponentLib -componentNameToComponent (CN.CSubLibName s) = ComponentSubLib s -componentNameToComponent (CN.CFLibName s) = ComponentFLib s -componentNameToComponent (CN.CExeName s) = ComponentExe s -componentNameToComponent (CN.CTestName s) = ComponentTest s -componentNameToComponent (CN.CBenchName s) = ComponentBench s +componentNameToComponent (CN.CLibName LN.LMainLibName) = ComponentLib +componentNameToComponent (CN.CLibName (LN.LSubLibName s)) = ComponentSubLib s +componentNameToComponent (CN.CFLibName s) = ComponentFLib s +componentNameToComponent (CN.CExeName s) = ComponentExe s +componentNameToComponent (CN.CTestName s) = ComponentTest s +componentNameToComponent (CN.CBenchName s) = ComponentBench s {------------------------------------------------------------------------------- Construction diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageConstraint.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageConstraint.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageConstraint.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageConstraint.hs 2018-11-27 22:50:01.000000000 +0000 @@ -22,6 +22,7 @@ import Distribution.Package (PackageName) import Distribution.PackageDescription (FlagAssignment, dispFlagAssignment) import Distribution.Types.Dependency (Dependency(..)) +import Distribution.Types.LibraryName (LibraryName(..)) import Distribution.Version (VersionRange, simplifyVersionRange) import Distribution.Solver.Compat.Prelude ((<<>>)) @@ -32,6 +33,7 @@ import GHC.Generics (Generic) import Text.PrettyPrint ((<+>)) import qualified Text.PrettyPrint as Disp +import qualified Data.Set as Set -- | Determines to what packages and in what contexts a @@ -142,7 +144,7 @@ packageConstraintToDependency (PackageConstraint scope prop) = toDep prop where toDep (PackagePropertyVersion vr) = - Just $ Dependency (scopeToPackageName scope) vr + Just $ Dependency (scopeToPackageName scope) vr (Set.singleton LMainLibName) toDep (PackagePropertyInstalled) = Nothing toDep (PackagePropertySource) = Nothing toDep (PackagePropertyFlags _) = Nothing diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageIndex.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageIndex.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageIndex.hs 2018-10-17 15:56:31.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/Distribution/Solver/Types/PackageIndex.hs 2018-11-27 22:50:01.000000000 +0000 @@ -55,9 +55,8 @@ import Distribution.Package ( PackageName, unPackageName, PackageIdentifier(..) , Package(..), packageName, packageVersion ) -import Distribution.Types.Dependency import Distribution.Version - ( withinRange ) + ( VersionRange, withinRange ) import Distribution.Simple.Utils ( lowercase, comparing ) @@ -210,10 +209,10 @@ delete name (\pkg -> packageName pkg == name) -- | Removes all packages satisfying this dependency from the index. --- -deleteDependency :: Package pkg => Dependency -> PackageIndex pkg +deleteDependency :: Package pkg + => PackageName -> VersionRange -> PackageIndex pkg -> PackageIndex pkg -deleteDependency (Dependency name verstionRange) = +deleteDependency name verstionRange = delete name (\pkg -> packageVersion pkg `withinRange` verstionRange) -- @@ -269,8 +268,11 @@ -- We get back any number of versions of the specified package name, all -- satisfying the version range constraint. -- -lookupDependency :: Package pkg => PackageIndex pkg -> Dependency -> [pkg] -lookupDependency index (Dependency name versionRange) = +lookupDependency :: Package pkg + => PackageIndex pkg + -> PackageName -> VersionRange + -> [pkg] +lookupDependency index name versionRange = [ pkg | pkg <- lookup index name , packageName pkg == name , packageVersion pkg `withinRange` versionRange ] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/main/Main.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/main/Main.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/cabal-install-2.5.0.0/main/Main.hs 2018-10-17 15:56:30.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/cabal-install-2.5.0.0/main/Main.hs 2018-11-27 22:50:00.000000000 +0000 @@ -38,7 +38,7 @@ , UploadFlags(..), uploadCommand , ReportFlags(..), reportCommand , runCommand - , InitFlags(initVerbosity), initCommand + , InitFlags(initVerbosity, initHcPath), initCommand , SDistFlags(..), SDistExFlags(..), sdistCommand , Win32SelfUpgradeFlags(..), win32SelfUpgradeCommand , ActAsSetupFlags(..), actAsSetupCommand @@ -142,9 +142,7 @@ import Distribution.Client.Manpage (manpage) import qualified Distribution.Client.Win32SelfUpgrade as Win32SelfUpgrade import Distribution.Client.Utils (determineNumJobs -#if defined(mingw32_HOST_OS) ,relaxEncodingErrors -#endif ) import Distribution.Package (packageId) @@ -191,10 +189,7 @@ import System.FilePath ( dropExtension, splitExtension , takeExtension, (), (<.>)) import System.IO ( BufferMode(LineBuffering), hSetBuffering -#ifdef mingw32_HOST_OS - , stderr -#endif - , stdout ) + , stderr, stdout ) import System.Directory (doesFileExist, getCurrentDirectory) import Data.Monoid (Any(..)) import Control.Exception (SomeException(..), try) @@ -230,18 +225,16 @@ -- Enable line buffering so that we can get fast feedback even when piped. -- This is especially important for CI and build systems. hSetBuffering stdout LineBuffering - -- The default locale encoding for Windows CLI is not UTF-8 and printing - -- Unicode characters to it will fail unless we relax the handling of encoding - -- errors when writing to stderr and stdout. -#ifdef mingw32_HOST_OS + -- If the locale encoding for CLI doesn't support all Unicode characters, + -- printing to it may fail unless we relax the handling of encoding errors + -- when writing to stderr and stdout. relaxEncodingErrors stdout relaxEncodingErrors stderr -#endif getArgs >>= mainWorker mainWorker :: [String] -> IO () mainWorker args = do - validScript <- + validScript <- if null args then return False else doesFileExist (last args) @@ -259,7 +252,7 @@ -> printNumericVersion CommandHelp help -> printCommandHelp help CommandList opts -> printOptionsList opts - CommandErrors errs + CommandErrors errs | validScript -> CmdRun.handleShebang (last args) | otherwise -> printErrors errs CommandReadyToGo action -> do @@ -323,9 +316,9 @@ , newCmd CmdTest.testCommand CmdTest.testAction , newCmd CmdBench.benchCommand CmdBench.benchAction , newCmd CmdExec.execCommand CmdExec.execAction - , newCmd CmdClean.cleanCommand CmdClean.cleanAction + , newCmd CmdClean.cleanCommand CmdClean.cleanAction , newCmd CmdSdist.sdistCommand CmdSdist.sdistAction - + , legacyCmd configureExCommand configureAction , legacyCmd updateCommand updateAction , legacyCmd buildCommand buildAction @@ -560,9 +553,9 @@ either (const onNoPkgDesc) (const onPkgDesc) pkgDesc -installAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +installAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> Action -installAction (configFlags, _, installFlags, _) _ globalFlags +installAction (configFlags, _, installFlags, _, _) _ globalFlags | fromFlagOrDefault False (installOnly installFlags) = do let verb = fromFlagOrDefault normal (configVerbosity configFlags) (useSandbox, config) <- loadConfigOrSandboxConfig verb globalFlags @@ -574,7 +567,7 @@ installCommand (const mempty) (const []) installAction - (configFlags, configExFlags, installFlags, haddockFlags) + (configFlags, configExFlags, installFlags, haddockFlags, testFlags) extraArgs globalFlags = do let verb = fromFlagOrDefault normal (configVerbosity configFlags) (useSandbox, config) <- updateInstallDirs (configUserInstall configFlags) @@ -610,6 +603,9 @@ haddockFlags' = defaultHaddockFlags `mappend` savedHaddockFlags config `mappend` haddockFlags { haddockDistPref = toFlag dist } + testFlags' = Cabal.defaultTestFlags `mappend` + savedTestFlags config `mappend` + testFlags { testDistPref = toFlag dist } globalFlags' = savedGlobalFlags config `mappend` globalFlags (comp, platform, progdb) <- configCompilerAux' configFlags' -- TODO: Redesign ProgramDB API to prevent such problems as #2241 in the @@ -646,7 +642,7 @@ comp platform progdb' useSandbox mSandboxPkgInfo globalFlags' configFlags'' configExFlags' - installFlags' haddockFlags' + installFlags' haddockFlags' testFlags' targets where @@ -888,9 +884,9 @@ withRepoContext verbosity globalFlags' $ \repoContext -> update verbosity updateFlags repoContext -upgradeAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) +upgradeAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags) -> [String] -> Action -upgradeAction (configFlags, _, _, _) _ _ = die' verbosity $ +upgradeAction (configFlags, _, _, _, _) _ _ = die' verbosity $ "Use the 'cabal install' command instead of 'cabal upgrade'.\n" ++ "You can install the latest version of a package using 'cabal install'. " ++ "The 'cabal upgrade' command has been removed because people found it " @@ -1143,7 +1139,9 @@ die' verbosity $ "'init' doesn't take any extra arguments: " ++ unwords extraArgs (_useSandbox, config) <- loadConfigOrSandboxConfig verbosity (globalFlags { globalRequireSandbox = Flag False }) - let configFlags = savedConfigureFlags config + let configFlags = savedConfigureFlags config `mappend` + -- override with `--with-compiler` from CLI if available + mempty { configHcPath = initHcPath initFlags } let globalFlags' = savedGlobalFlags config `mappend` globalFlags (comp, _, progdb) <- configCompilerAux' configFlags withRepoContext verbosity globalFlags' $ \repoContext -> diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/ancilData.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/ancilData.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/ancilData.c 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/ancilData.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ -/* - * Copyright(c), 2002 The GHC Team. - */ - -#ifdef aix_HOST_OS -#define _LINUX_SOURCE_COMPAT -// Required to get CMSG_SPACE/CMSG_LEN macros. See #265. -// Alternative is to #define COMPAT_43 and use the -// HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS code instead, but that means -// fiddling with the configure script too. -#endif - -#include "HsNet.h" -#include - -#if HAVE_STRUCT_MSGHDR_MSG_CONTROL || HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS /* until end */ - -/* - * Support for transmitting file descriptors. - * - * - */ - - -/* - * sendmsg() and recvmsg() wrappers for transmitting - * ancillary socket data. - * - * Doesn't provide the full generality of either, specifically: - * - * - no support for scattered read/writes. - * - only possible to send one ancillary chunk of data at a time. - */ - -int -sendFd(int sock, - int outfd) -{ - struct msghdr msg = {0}; - struct iovec iov[1]; - char buf[2]; -#if HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS - msg.msg_accrights = (void*)&outfd; - msg.msg_accrightslen = sizeof(int); -#else - struct cmsghdr *cmsg; - char ancBuffer[CMSG_SPACE(sizeof(int))]; - char* dPtr; - - msg.msg_control = ancBuffer; - msg.msg_controllen = sizeof(ancBuffer); - - cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - cmsg->cmsg_len = CMSG_LEN(sizeof(int)); - dPtr = (char*)CMSG_DATA(cmsg); - - *(int*)dPtr = outfd; - msg.msg_controllen = cmsg->cmsg_len; -#endif - - buf[0] = 0; buf[1] = '\0'; - iov[0].iov_base = buf; - iov[0].iov_len = 2; - - msg.msg_iov = iov; - msg.msg_iovlen = 1; - - return sendmsg(sock,&msg,0); -} - -int -recvFd(int sock) -{ - struct msghdr msg = {0}; - char duffBuf[10]; - int rc; - int len = sizeof(int); - struct iovec iov[1]; -#if HAVE_STRUCT_MSGHDR_MSG_CONTROL - struct cmsghdr *cmsg = NULL; - struct cmsghdr *cptr; -#else - int* fdBuffer; -#endif - int fd; - - iov[0].iov_base = duffBuf; - iov[0].iov_len = sizeof(duffBuf); - msg.msg_iov = iov; - msg.msg_iovlen = 1; - -#if HAVE_STRUCT_MSGHDR_MSG_CONTROL - cmsg = (struct cmsghdr*)malloc(CMSG_SPACE(len)); - if (cmsg==NULL) { - return -1; - } - - msg.msg_control = (void *)cmsg; - msg.msg_controllen = CMSG_LEN(len); -#else - fdBuffer = (int*)malloc(len); - if (fdBuffer) { - msg.msg_accrights = (void *)fdBuffer; - } else { - return -1; - } - msg.msg_accrightslen = len; -#endif - - if ((rc = recvmsg(sock,&msg,0)) < 0) { -#if HAVE_STRUCT_MSGHDR_MSG_CONTROL - free(cmsg); -#else - free(fdBuffer); -#endif - return rc; - } - -#if HAVE_STRUCT_MSGHDR_MSG_CONTROL - cptr = (struct cmsghdr*)CMSG_FIRSTHDR(&msg); - fd = *(int*)CMSG_DATA(cptr); - free(cmsg); -#else - fd = *(int*)fdBuffer; - free(fdBuffer); -#endif - return fd; -} - -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/asyncAccept.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/asyncAccept.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/asyncAccept.c 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/asyncAccept.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - * (c) sof, 2003. - */ - -#include "HsNet.h" -#include "HsFFI.h" - -#if defined(HAVE_WINSOCK2_H) - -/* all the way to the end */ - -/* - * To support non-blocking accept()s with WinSock, we use the asyncDoProc# - * primop, which lets a Haskell thread call an external routine without - * blocking the progress of other threads. - * - * As can readily be seen, this is a low-level mechanism. - * - */ - -typedef struct AcceptData { - int fdSock; - int newSock; - void* sockAddr; - int size; -} AcceptData; - -/* - * Fill in parameter block that's passed along when the RTS invokes the - * accept()-calling proc below (acceptDoProc()) - */ -void* -newAcceptParams(int sock, - int sz, - void* sockaddr) -{ - AcceptData* data = (AcceptData*)malloc(sizeof(AcceptData)); - if (!data) return NULL; - data->fdSock = sock; - data->newSock = 0; - data->sockAddr = sockaddr; - data->size = sz; - - return data; -} - -/* Accessors for return code and accept()'s socket result. */ - -int -acceptNewSock(void* d) -{ - return (((AcceptData*)d)->newSock); -} - -/* Routine invoked by an RTS worker thread */ -int -acceptDoProc(void* param) -{ - SOCKET s; - - AcceptData* data = (AcceptData*)param; - s = accept( data->fdSock, - data->sockAddr, - &data->size); - data->newSock = s; - if ( s == INVALID_SOCKET ) { - return GetLastError(); - } else { - return 0; - } -} -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/HsNet.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/HsNet.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/HsNet.c 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/HsNet.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -/* ----------------------------------------------------------------------------- - * (c) The University of Glasgow 2002 - * - * static versions of the inline functions from HsNet.h - * -------------------------------------------------------------------------- */ - -#define INLINE -#include "HsNet.h" diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/initWinSock.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/initWinSock.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/initWinSock.c 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/initWinSock.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#include "HsNet.h" -#include "HsFFI.h" - -#if defined(HAVE_WINSOCK2_H) - -static int winsock_inited = 0; - -static void -shutdownHandler(void) -{ - WSACleanup(); -} - -/* Initialising WinSock... */ -int -initWinSock () -{ - WORD wVersionRequested; - WSADATA wsaData; - int err; - - if (!winsock_inited) { - wVersionRequested = MAKEWORD( 2, 2 ); - - err = WSAStartup ( wVersionRequested, &wsaData ); - - if ( err != 0 ) { - return err; - } - - if ( LOBYTE( wsaData.wVersion ) != 2 || - HIBYTE( wsaData.wVersion ) != 2 ) { - WSACleanup(); - return (-1); - } - - atexit(shutdownHandler); - winsock_inited = 1; - } - return 0; -} - -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/winSockErr.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/winSockErr.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/cbits/winSockErr.c 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/cbits/winSockErr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -#include "HsNet.h" -#include "HsFFI.h" - -#if defined(HAVE_WINSOCK2_H) -#include - -/* to the end */ - -const char* -getWSErrorDescr(int err) -{ - static char otherErrMsg[256]; - - switch (err) { - case WSAEINTR: return "Interrupted function call (WSAEINTR)"; - case WSAEBADF: return "bad socket descriptor (WSAEBADF)"; - case WSAEACCES: return "Permission denied (WSAEACCESS)"; - case WSAEFAULT: return "Bad address (WSAEFAULT)"; - case WSAEINVAL: return "Invalid argument (WSAEINVAL)"; - case WSAEMFILE: return "Too many open files (WSAEMFILE)"; - case WSAEWOULDBLOCK: return "Resource temporarily unavailable (WSAEWOULDBLOCK)"; - case WSAEINPROGRESS: return "Operation now in progress (WSAEINPROGRESS)"; - case WSAEALREADY: return "Operation already in progress (WSAEALREADY)"; - case WSAENOTSOCK: return "Socket operation on non-socket (WSAENOTSOCK)"; - case WSAEDESTADDRREQ: return "Destination address required (WSAEDESTADDRREQ)"; - case WSAEMSGSIZE: return "Message too long (WSAEMSGSIZE)"; - case WSAEPROTOTYPE: return "Protocol wrong type for socket (WSAEPROTOTYPE)"; - case WSAENOPROTOOPT: return "Bad protocol option (WSAENOPROTOOPT)"; - case WSAEPROTONOSUPPORT: return "Protocol not supported (WSAEPROTONOSUPPORT)"; - case WSAESOCKTNOSUPPORT: return "Socket type not supported (WSAESOCKTNOSUPPORT)"; - case WSAEOPNOTSUPP: return "Operation not supported (WSAEOPNOTSUPP)"; - case WSAEPFNOSUPPORT: return "Protocol family not supported (WSAEPFNOSUPPORT)"; - case WSAEAFNOSUPPORT: return "Address family not supported by protocol family (WSAEAFNOSUPPORT)"; - case WSAEADDRINUSE: return "Address already in use (WSAEADDRINUSE)"; - case WSAEADDRNOTAVAIL: return "Cannot assign requested address (WSAEADDRNOTAVAIL)"; - case WSAENETDOWN: return "Network is down (WSAENETDOWN)"; - case WSAENETUNREACH: return "Network is unreachable (WSAENETUNREACH)"; - case WSAENETRESET: return "Network dropped connection on reset (WSAENETRESET)"; - case WSAECONNABORTED: return "Software caused connection abort (WSAECONNABORTED)"; - case WSAECONNRESET: return "Connection reset by peer (WSAECONNRESET)"; - case WSAENOBUFS: return "No buffer space available (WSAENOBUFS)"; - case WSAEISCONN: return "Socket is already connected (WSAEISCONN)"; - case WSAENOTCONN: return "Socket is not connected (WSAENOTCONN)"; - case WSAESHUTDOWN: return "Cannot send after socket shutdown (WSAESHUTDOWN)"; - case WSAETOOMANYREFS: return "Too many references (WSAETOOMANYREFS)"; - case WSAETIMEDOUT: return "Connection timed out (WSAETIMEDOUT)"; - case WSAECONNREFUSED: return "Connection refused (WSAECONNREFUSED)"; - case WSAELOOP: return "Too many levels of symbolic links (WSAELOOP)"; - case WSAENAMETOOLONG: return "Filename too long (WSAENAMETOOLONG)"; - case WSAEHOSTDOWN: return "Host is down (WSAEHOSTDOWN)"; - case WSAEHOSTUNREACH: return "Host is unreachable (WSAEHOSTUNREACH)"; - case WSAENOTEMPTY: return "Resource not empty (WSAENOTEMPTY)"; - case WSAEPROCLIM: return "Too many processes (WSAEPROCLIM)"; - case WSAEUSERS: return "Too many users (WSAEUSERS)"; - case WSAEDQUOT: return "Disk quota exceeded (WSAEDQUOT)"; - case WSAESTALE: return "Stale NFS file handle (WSAESTALE)"; - case WSAEREMOTE: return "Too many levels of remote in path (WSAEREMOTE)"; - case WSAEDISCON: return "Graceful shutdown in progress (WSAEDISCON)"; - case WSASYSNOTREADY: return "Network subsystem is unavailable (WSASYSNOTREADY)"; - case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range (WSAVERNOTSUPPORTED)"; - case WSANOTINITIALISED: return "Successful WSAStartup not yet performed (WSANOTINITIALISED)"; -#ifdef WSATYPE_NOT_FOUND - case WSATYPE_NOT_FOUND: return "Class type not found (WSATYPE_NOT_FOUND)"; -#endif - case WSAHOST_NOT_FOUND: return "Host not found (WSAHOST_NOT_FOUND)"; - case WSATRY_AGAIN: return "Nonauthoritative host not found (WSATRY_AGAIN)"; - case WSANO_RECOVERY: return "This is a nonrecoverable error (WSANO_RECOVERY)"; - case WSANO_DATA: return "Valid name, no data record of requested type (WSANO_DATA)"; - default: - sprintf(otherErrMsg, "Unknown WinSock error: %u", err); - return otherErrMsg; - } -} - -#endif - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/CHANGELOG.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/CHANGELOG.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/CHANGELOG.md 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/CHANGELOG.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -## Version 2.7.0.2 - -* Removing withMVar to avoid the deadlock between "accept" and "close" - [#330](https://github.com/haskell/network/pull/330) -* "close" does not throw exceptions. A new API: "close'" throws - exceptions when necessary. - [#337](https://github.com/haskell/network/pull/337) -* Fixing the hang of lazy sendAll. - [#340](https://github.com/haskell/network/pull/340) -* Installing NetDef.h (#334) - [#334](https://github.com/haskell/network/pull/334) - -## Version 2.7.0.1 - - * A new API: socketPortSafe. - [#319](https://github.com/haskell/network/pull/319) - * Fixing a drain bug of sendAll. - [#320](https://github.com/haskell/network/pull/320) - * Porting the new CALLCONV convention from master. - [#313](https://github.com/haskell/network/pull/313) - * Withdrawing the deprecations of packFamily and unpackFamily. - [#324](https://github.com/haskell/network/pull/324) - -## Version 2.7.0.0 - - * Obsoleting the Network module. - * Obsoleting the Network.BSD module. - * Obsoleting APIs: MkSocket, htonl, ntohl, - getPeerCred, getPeerEid, - send, sendTo, recv, recvFrom, recvLen, - inet_addr, inet_ntoa, - isConnected, isBound, isListening, isReadable, isWritable, - aNY_PORT, iNADDR_ANY, iN6ADDR_ANY, sOMAXCONN, - sOL_SOCKET, sCM_RIGHTS, - packFamily, unpackFamily, packSocketType - * Do not closeFd within sendFd. - [#271](https://github.com/haskell/network/pull/271) - * Exporting ifNameToIndex and ifIndexToName from Network.Socket. - * New APIs: setCloseOnExecIfNeeded, getCloseOnExec and getNonBlock - * New APIs: isUnixDomainSocketAvailable and getPeerCredential - * socketPair, sendFd and recvFd are exported even on Windows. - -## Version 2.6.3.5 - - * Reverting "Do not closeFd within sendFd" - [#271](https://github.com/haskell/network/pull/271) - -## Version 2.6.3.4 - - * Don't touch IPv6Only when running on OpenBSD - [#227](https://github.com/haskell/network/pull/227) - * Do not closeFd within sendFd - [#271](https://github.com/haskell/network/pull/271) - * Updating examples and docs. - -## Version 2.6.3.3 - - * Adds a function to show the defaultHints without reading their undefined fields - [#291](https://github.com/haskell/network/pull/291) - * Improve exception error messages for getAddrInfo and getNameInfo - [#289](https://github.com/haskell/network/pull/289) - * Deprecating SockAddrCan. - -## Version 2.6.3.2 - - * Zero memory of `sockaddr_un` if abstract socket - [#220](https://github.com/haskell/network/pull/220) - - * Improving error messages - [#232](https://github.com/haskell/network/pull/232) - - * Allow non-blocking file descriptors via `setNonBlockIfNeeded` - [#242](https://github.com/haskell/network/pull/242) - - * Update config.{guess,sub} to latest version - [#244](https://github.com/haskell/network/pull/244) - - * Rename `my_inet_ntoa` to avoid symbol conflicts - [#228](https://github.com/haskell/network/pull/228) - - * Test infrastructure improvements - [#219](https://github.com/haskell/network/pull/219) - [#217](https://github.com/haskell/network/pull/217) - [#218](https://github.com/haskell/network/pull/218) - - * House keeping and cleanup - [#238](https://github.com/haskell/network/pull/238) - [#237](https://github.com/haskell/network/pull/237) - -## Version 2.6.3.1 - - * Reverse breaking exception change in `Network.Socket.ByteString.recv` - [#215](https://github.com/haskell/network/issues/215) - -## Version 2.6.3.0 - - * New maintainers: Evan Borden (@eborden) and Kazu Yamamoto (@kazu-yamamoto). - The maintainer for a long period, Johan Tibell (@tibbe) stepped down. - Thank you, Johan, for your hard work for a long time. - - * New APIs: ntohl, htonl,hostAddressToTuple{,6} and tupleToHostAddress{,6}. - [#210](https://github.com/haskell/network/pull/210) - - * Added a Read instance for PortNumber. [#145](https://github.com/haskell/network/pull/145) - - * We only set the IPV6_V6ONLY flag to 0 for stream and datagram socket types, - as opposed to all of them. This makes it possible to use ICMPv6. - [#180](https://github.com/haskell/network/pull/180) - [#181](https://github.com/haskell/network/pull/181) - - * Work around GHC bug #12020. Socket errors no longer cause segfaults or - hangs on Windows. [#192](https://github.com/haskell/network/pull/192) - - * Various documentation improvements and the deprecated pragmas. - [#186](https://github.com/haskell/network/pull/186) - [#201](https://github.com/haskell/network/issues/201) - [#205](https://github.com/haskell/network/pull/205) - [#206](https://github.com/haskell/network/pull/206) - [#211](https://github.com/haskell/network/issues/211) - - * Various internal improvements. - [#193](https://github.com/haskell/network/pull/193) - [#200](https://github.com/haskell/network/pull/200) - -## Version 2.6.2.1 - - * Regenerate configure and HsNetworkConfig.h.in. - - * Better detection of CAN sockets. - -## Version 2.6.2.0 - - * Add support for TCP_USER_TIMEOUT. - - * Don't conditionally export the SockAddr constructors. - - * Add isSupportSockAddr to allow checking for supported address types - at runtime. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/config.guess cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/config.guess --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/config.guess 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,1466 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. - -timestamp='2017-03-05' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "${UNAME_SYSTEM}" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval $set_cc_for_build - cat <<-EOF > $dummy.c - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ - echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown - ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = hppa2.0w ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi - else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - e2k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - mips64el:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - NSX-?:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -cat >&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/config.sub cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/config.sub --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/config.sub 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,1836 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2017 Free Software Foundation, Inc. - -timestamp='2017-04-02' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2017 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - wasm32) - basic_machine=wasm32-unknown - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/configure cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/configure --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/configure 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,5389 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Haskell network package 2.6.3.5. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: libraries@haskell.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='Haskell network package' -PACKAGE_TARNAME='network' -PACKAGE_VERSION='2.6.3.5' -PACKAGE_STRING='Haskell network package 2.6.3.5' -PACKAGE_BUGREPORT='libraries@haskell.org' -PACKAGE_URL='' - -ac_unique_file="include/HsNet.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -EXTRA_SRCS -EXTRA_LIBS -EXTRA_CPPFLAGS -CALLCONV -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_cc -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures Haskell network package 2.6.3.5 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/network] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Haskell network package 2.6.3.5:";; - esac - cat <<\_ACEOF - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -C compiler - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -Haskell network package configure 2.6.3.5 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------ ## -## Report this to libraries@haskell.org ## -## ------------------------------------ ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by Haskell network package $as_me 2.6.3.5, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_includes_default="$ac_includes_default -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_WINSOCK2_H -# include -#endif -#ifdef HAVE_WS2TCPIP_H -# include -// fix for MingW not defining IPV6_V6ONLY -# define IPV6_V6ONLY 27 -#endif" - -# Safety check: Ensure that we are in the correct source directory. - - -ac_config_headers="$ac_config_headers include/HsNetworkConfig.h" - - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - -# Check whether --with-cc was given. -if test "${with_cc+set}" = set; then : - withval=$with_cc; CC=$withval -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in fcntl.h limits.h stdlib.h sys/types.h unistd.h winsock2.h ws2tcpip.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h linux/can.h linux/tcp.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in net/if.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" -if test "x$ac_cv_header_net_if_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF - -fi - -done - - -for ac_func in readlink symlink if_nametoindex -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif -#if HAVE_SYS_UIO_H -# include -#endif -" -if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrights" "ac_cv_member_struct_msghdr_msg_accrights" "#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif -#if HAVE_SYS_UIO_H -# include -#endif -" -if test "x$ac_cv_member_struct_msghdr_msg_accrights" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS 1 -_ACEOF - - -fi - - -ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif -" -if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 -_ACEOF - - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_addr_t in netinet/in.h" >&5 -$as_echo_n "checking for in_addr_t in netinet/in.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "in_addr_t" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_IN_ADDR_T 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_PEERCRED and struct ucred in sys/socket.h" >&5 -$as_echo_n "checking for SO_PEERCRED and struct ucred in sys/socket.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef SO_PEERCRED -# error no SO_PEERCRED -#endif -struct ucred u; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_ucred=yes -else - ac_cv_ucred=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test "x$ac_cv_ucred" = xno; then - old_CFLAGS="$CFLAGS" - CFLAGS="-D_GNU_SOURCE $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef SO_PEERCRED -# error no SO_PEERCRED -#endif -struct ucred u; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_ucred=yes -else - ac_cv_ucred=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$ac_cv_ucred" = xyes; then - EXTRA_CPPFLAGS=-D_GNU_SOURCE - fi -else - old_CFLAGS="$CFLAGS" -fi -if test "x$ac_cv_ucred" = xno; then - CFLAGS="$old_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - -$as_echo "#define HAVE_STRUCT_UCRED 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeereid in unistd.h" >&5 -$as_echo_n "checking for getpeereid in unistd.h... " >&6; } -ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid" -if test "x$ac_cv_func_getpeereid" = xyes; then : - -$as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _head_libws2_32_a in -lws2_32" >&5 -$as_echo_n "checking for _head_libws2_32_a in -lws2_32... " >&6; } -if ${ac_cv_lib_ws2_32__head_libws2_32_a+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _head_libws2_32_a (); -int -main () -{ -return _head_libws2_32_a (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ws2_32__head_libws2_32_a=yes -else - ac_cv_lib_ws2_32__head_libws2_32_a=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32__head_libws2_32_a" >&5 -$as_echo "$ac_cv_lib_ws2_32__head_libws2_32_a" >&6; } -if test "x$ac_cv_lib_ws2_32__head_libws2_32_a" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF - - LIBS="-lws2_32 $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 -$as_echo_n "checking for getaddrinfo... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int testme(){ getaddrinfo; } -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h - ac_have_getaddrinfo=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test "x$ac_have_getaddrinfo" = x; then - old_CFLAGS="$CFLAGS" - if test "z$ac_cv_lib_ws2_32__head_libws2_32_a" = zyes; then - CFLAGS="-DWINVER=0x0501 $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo if WINVER is 0x0501" >&5 -$as_echo_n "checking for getaddrinfo if WINVER is 0x0501... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - int testme(){ getaddrinfo; } -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h - -$as_echo "#define NEED_WINVER_XP 1" >>confdefs.h - EXTRA_CPPFLAGS="-DWINVER=0x0501 $EXTRA_CPPFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - CFLAGS="$old_CFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -fi - -for ac_func in gai_strerror -do : - ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" -if test "x$ac_cv_func_gai_strerror" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GAI_STRERROR 1 -_ACEOF - -fi -done - - -ac_fn_c_check_decl "$LINENO" "AI_ADDRCONFIG" "ac_cv_have_decl_AI_ADDRCONFIG" "$ac_includes_default" -if test "x$ac_cv_have_decl_AI_ADDRCONFIG" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_AI_ADDRCONFIG $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "AI_ALL" "ac_cv_have_decl_AI_ALL" "$ac_includes_default" -if test "x$ac_cv_have_decl_AI_ALL" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_AI_ALL $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "$ac_includes_default" -if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_AI_NUMERICSERV $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "AI_V4MAPPED" "ac_cv_have_decl_AI_V4MAPPED" "$ac_includes_default" -if test "x$ac_cv_have_decl_AI_V4MAPPED" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_AI_V4MAPPED $ac_have_decl -_ACEOF - - -ac_fn_c_check_decl "$LINENO" "IPV6_V6ONLY" "ac_cv_have_decl_IPV6_V6ONLY" "$ac_includes_default" -if test "x$ac_cv_have_decl_IPV6_V6ONLY" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_IPV6_V6ONLY $ac_have_decl -_ACEOF - - -ac_fn_c_check_decl "$LINENO" "IPPROTO_IP" "ac_cv_have_decl_IPPROTO_IP" "$ac_includes_default" -if test "x$ac_cv_have_decl_IPPROTO_IP" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_IPPROTO_IP $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "IPPROTO_TCP" "ac_cv_have_decl_IPPROTO_TCP" "$ac_includes_default" -if test "x$ac_cv_have_decl_IPPROTO_TCP" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_IPPROTO_TCP $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "IPPROTO_IPV6" "ac_cv_have_decl_IPPROTO_IPV6" "$ac_includes_default" -if test "x$ac_cv_have_decl_IPPROTO_IPV6" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_IPPROTO_IPV6 $ac_have_decl -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in sys/sendfile.h" >&5 -$as_echo_n "checking for sendfile in sys/sendfile.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sendfile" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_LINUX_SENDFILE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in sys/socket.h" >&5 -$as_echo_n "checking for sendfile in sys/socket.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sendfile" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_BSD_SENDFILE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* - - -for ac_func in gethostent -do : - ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent" -if test "x$ac_cv_func_gethostent" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTENT 1 -_ACEOF - -fi -done - - -for ac_func in accept4 -do : - ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4" -if test "x$ac_cv_func_accept4" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACCEPT4 1 -_ACEOF - -fi -done - - -case "$host" in -*-mingw* | *-msys*) - EXTRA_SRCS="cbits/initWinSock.c, cbits/winSockErr.c, cbits/asyncAccept.c" - EXTRA_LIBS=ws2_32 - CALLCONV=stdcall ;; -*-solaris2*) - EXTRA_SRCS="cbits/ancilData.c" - EXTRA_LIBS="nsl, socket" - CALLCONV=ccall ;; -*) - EXTRA_SRCS="cbits/ancilData.c" - EXTRA_LIBS= - CALLCONV=ccall ;; -esac - - - - - -ac_config_files="$ac_config_files network.buildinfo" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by Haskell network package $as_me 2.6.3.5, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -Haskell network package config.status 2.6.3.5 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "include/HsNetworkConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/HsNetworkConfig.h" ;; - "network.buildinfo") CONFIG_FILES="$CONFIG_FILES network.buildinfo" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/configure.ac cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/configure.ac --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/configure.ac 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/configure.ac 1970-01-01 00:00:00.000000000 +0000 @@ -1,192 +0,0 @@ -AC_INIT([Haskell network package], [2.7.0.2], [libraries@haskell.org], [network]) - -ac_includes_default="$ac_includes_default -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_WINSOCK2_H -# include -#endif -#ifdef HAVE_WS2TCPIP_H -# include -// fix for MingW not defining IPV6_V6ONLY -# define IPV6_V6ONLY 27 -#endif" - -# Safety check: Ensure that we are in the correct source directory. -AC_CONFIG_SRCDIR([include/HsNet.h]) - -AC_CONFIG_HEADERS([include/HsNetworkConfig.h]) - -AC_CANONICAL_HOST - -AC_ARG_WITH([cc], - [C compiler], - [CC=$withval]) -AC_PROG_CC() - -AC_C_CONST - -dnl ** check for specific header (.h) files that we are interested in -AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h sys/types.h unistd.h winsock2.h ws2tcpip.h]) -AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h linux/can.h linux/tcp.h]) -AC_CHECK_HEADERS([net/if.h]) - -AC_CHECK_FUNCS([readlink symlink if_nametoindex]) - -dnl ** check what fields struct msghdr contains -AC_CHECK_MEMBERS([struct msghdr.msg_control, struct msghdr.msg_accrights], [], [], [#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif -#if HAVE_SYS_UIO_H -# include -#endif]) - -dnl ** check if struct sockaddr contains sa_len -AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif]) - -dnl -------------------------------------------------- -dnl * test for in_addr_t -dnl -------------------------------------------------- -AC_MSG_CHECKING(for in_addr_t in netinet/in.h) -AC_EGREP_HEADER(in_addr_t, netinet/in.h, - [ AC_DEFINE([HAVE_IN_ADDR_T], [1], [Define to 1 if in_addr_t is available.]) AC_MSG_RESULT(yes) ], - AC_MSG_RESULT(no)) - -dnl -------------------------------------------------- -dnl * test for SO_PEERCRED and struct ucred -dnl -------------------------------------------------- -AC_MSG_CHECKING(for SO_PEERCRED and struct ucred in sys/socket.h) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#include -#ifndef SO_PEERCRED -# error no SO_PEERCRED -#endif -struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no) -if test "x$ac_cv_ucred" = xno; then - old_CFLAGS="$CFLAGS" - CFLAGS="-D_GNU_SOURCE $CFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#include -#ifndef SO_PEERCRED -# error no SO_PEERCRED -#endif -struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no) - if test "x$ac_cv_ucred" = xyes; then - EXTRA_CPPFLAGS=-D_GNU_SOURCE - fi -else - old_CFLAGS="$CFLAGS" -fi -if test "x$ac_cv_ucred" = xno; then - CFLAGS="$old_CFLAGS" - AC_MSG_RESULT(no) -else - AC_DEFINE([HAVE_STRUCT_UCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct ucred.]) - AC_MSG_RESULT(yes) -fi - -dnl -------------------------------------------------- -dnl * test for GETPEEREID(3) -dnl -------------------------------------------------- -AC_MSG_CHECKING(for getpeereid in unistd.h) -AC_CHECK_FUNC( getpeereid, AC_DEFINE([HAVE_GETPEEREID], [1], [Define to 1 if you have getpeereid.] )) - -dnl -------------------------------------------------- -dnl * check for Windows networking libraries -dnl -------------------------------------------------- -AC_CHECK_LIB(ws2_32, _head_libws2_32_a) - -dnl -------------------------------------------------- -dnl * test for getaddrinfo as proxy for IPv6 support -dnl -------------------------------------------------- -AC_MSG_CHECKING(for getaddrinfo) -dnl Can't use AC_CHECK_FUNC here, because it doesn't do the right -dnl thing on Windows. -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default -int testme(){ getaddrinfo; }]])],[AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the `getaddrinfo' function.]) ac_have_getaddrinfo=yes; AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) - -dnl Under mingw, we may need to set WINVER to 0x0501 to expose getaddrinfo. -if test "x$ac_have_getaddrinfo" = x; then - old_CFLAGS="$CFLAGS" - if test "z$ac_cv_lib_ws2_32__head_libws2_32_a" = zyes; then - CFLAGS="-DWINVER=0x0501 $CFLAGS" - AC_MSG_CHECKING(for getaddrinfo if WINVER is 0x0501) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default - int testme(){ getaddrinfo; }]])],[AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the `getaddrinfo' function.]) AC_DEFINE([NEED_WINVER_XP], [1], [Define to 1 if the `getaddrinfo' function needs WINVER set.]) EXTRA_CPPFLAGS="-DWINVER=0x0501 $EXTRA_CPPFLAGS"; AC_MSG_RESULT(yes)],[CFLAGS="$old_CFLAGS"; AC_MSG_RESULT(no)]) - fi -fi - -dnl Missing under mingw, sigh. -AC_CHECK_FUNCS(gai_strerror) - -dnl ------------------------------------------------------- -dnl * test for AI_* flags that not all implementations have -dnl ------------------------------------------------------- -AC_CHECK_DECLS([AI_ADDRCONFIG, AI_ALL, AI_NUMERICSERV, AI_V4MAPPED]) - -dnl ------------------------------------------------------- -dnl * test for IPV6_V6ONLY flags that not all implementations have -dnl ------------------------------------------------------- -AC_CHECK_DECLS([IPV6_V6ONLY]) - -dnl ------------------------------------------------------- -dnl * test for IPPROTO_* macros/constants -dnl ------------------------------------------------------- -AC_CHECK_DECLS([IPPROTO_IP, IPPROTO_TCP, IPPROTO_IPV6]) - -dnl -------------------------------------------------- -dnl * test for Linux sendfile(2) -dnl -------------------------------------------------- -AC_MSG_CHECKING(for sendfile in sys/sendfile.h) -AC_EGREP_HEADER(sendfile, sys/sendfile.h, - [ AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have a Linux sendfile(2) implementation.]) AC_MSG_RESULT(yes) ], - AC_MSG_RESULT(no)) - -dnl -------------------------------------------------- -dnl * test for BSD sendfile(2) -dnl -------------------------------------------------- -AC_MSG_CHECKING(for sendfile in sys/socket.h) -AC_EGREP_HEADER(sendfile, sys/socket.h, - [ AC_DEFINE([HAVE_BSD_SENDFILE], [1], [Define to 1 if you have a BSDish sendfile(2) implementation.]) AC_MSG_RESULT(yes) ], - AC_MSG_RESULT(no)) - -AC_CHECK_FUNCS(gethostent) - -AC_CHECK_FUNCS(accept4) - -case "$host" in -*-mingw* | *-msys*) - EXTRA_SRCS="cbits/initWinSock.c, cbits/winSockErr.c, cbits/asyncAccept.c" - EXTRA_LIBS=ws2_32 - ;; -*-solaris2*) - EXTRA_SRCS="cbits/ancilData.c" - EXTRA_LIBS="nsl, socket" - ;; -*) - EXTRA_SRCS="cbits/ancilData.c" - EXTRA_LIBS= - ;; -esac -AC_SUBST([EXTRA_CPPFLAGS]) -AC_SUBST([EXTRA_LIBS]) -AC_SUBST([EXTRA_SRCS]) - -AC_CONFIG_FILES([network.buildinfo]) - -AC_OUTPUT diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/examples/EchoClient.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/examples/EchoClient.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/examples/EchoClient.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/examples/EchoClient.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} --- Echo client program -module Main (main) where - -import qualified Control.Exception as E -import qualified Data.ByteString.Char8 as C -import Network.Socket hiding (recv) -import Network.Socket.ByteString (recv, sendAll) - -main :: IO () -main = withSocketsDo $ do - addr <- resolve "127.0.0.1" "3000" - E.bracket (open addr) close talk - where - resolve host port = do - let hints = defaultHints { addrSocketType = Stream } - addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) - return addr - open addr = do - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - connect sock $ addrAddress addr - return sock - talk sock = do - sendAll sock "Hello, world!" - msg <- recv sock 1024 - putStr "Received: " - C.putStrLn msg diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/examples/EchoServer.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/examples/EchoServer.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/examples/EchoServer.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/examples/EchoServer.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ --- Echo server program -module Main (main) where - -import Control.Concurrent (forkFinally) -import qualified Control.Exception as E -import Control.Monad (unless, forever, void) -import qualified Data.ByteString as S -import Network.Socket hiding (recv) -import Network.Socket.ByteString (recv, sendAll) - -main :: IO () -main = withSocketsDo $ do - addr <- resolve "3000" - E.bracket (open addr) close loop - where - resolve port = do - let hints = defaultHints { - addrFlags = [AI_PASSIVE] - , addrSocketType = Stream - } - addr:_ <- getAddrInfo (Just hints) Nothing (Just port) - return addr - open addr = do - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - setSocketOption sock ReuseAddr 1 - -- If the prefork technique is not used, - -- set CloseOnExec for the security reasons. - let fd = fdSocket sock - setCloseOnExecIfNeeded fd - bind sock (addrAddress addr) - listen sock 10 - return sock - loop sock = forever $ do - (conn, peer) <- accept sock - putStrLn $ "Connection from " ++ show peer - void $ forkFinally (talk conn) (\_ -> close conn) - talk conn = do - msg <- recv conn 1024 - unless (S.null msg) $ do - sendAll conn msg - talk conn diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/include/HsNetDef.h cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/include/HsNetDef.h --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/include/HsNetDef.h 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/include/HsNetDef.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ifndef HSNETDEF_H -#define HSNETDEF_H - -#include "HsNetworkConfig.h" - -/* ultra-evil... */ -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION - -#if defined(HAVE_WINSOCK2_H) -# define WITH_WINSOCK 1 -#endif - -#if !defined(mingw32_HOST_OS) && !defined(_WIN32) -# define DOMAIN_SOCKET_SUPPORT 1 -#endif - -/* stdcall is for Windows 32. - Haskell FFI does not have a keyword for Windows 64. - If ccall/stdcall is specified on Windows 64, - GHC ignores it and use a proper ABI for Windows 64. - But if stdcall is specified, GHC displays a warning. - So, let's use ccall for Windows 64. - */ -#if defined(mingw32_HOST_OS) -# if defined(i386_HOST_ARCH) -# define CALLCONV stdcall -# elif defined(x86_64_HOST_ARCH) -# define CALLCONV ccall -# else -# error Unknown mingw32 arch -# endif -#else -# define CALLCONV ccall -#endif -#if defined(mingw32_HOST_OS) -# define SAFE_ON_WIN safe -#else -# define SAFE_ON_WIN unsafe -#endif - -#endif /* HSNETDEF_H */ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/include/HsNet.h cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/include/HsNet.h --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/include/HsNet.h 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/include/HsNet.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/* ----------------------------------------------------------------------------- - * - * Definitions for package `network' which are visible in Haskell land. - * - * ---------------------------------------------------------------------------*/ - -#ifndef HSNET_H -#define HSNET_H - -#include "HsNetDef.h" - -#ifdef NEED_WINVER -# define WINVER 0x0501 -#endif - -#ifndef INLINE -# if defined(_MSC_VER) -# define INLINE extern __inline -# elif defined(__GNUC_GNU_INLINE__) -# define INLINE extern inline -# else -# define INLINE inline -# endif -#endif - -#ifdef HAVE_GETADDRINFO -# define IPV6_SOCKET_SUPPORT 1 -#else -# undef IPV6_SOCKET_SUPPORT -#endif - -#if defined(HAVE_WINSOCK2_H) -#include -# ifdef HAVE_WS2TCPIP_H -# include -// fix for MingW not defining IPV6_V6ONLY -# define IPV6_V6ONLY 27 -# endif - -extern int initWinSock (); -extern const char* getWSErrorDescr(int err); -extern void* newAcceptParams(int sock, - int sz, - void* sockaddr); -extern int acceptNewSock(void* d); -extern int acceptDoProc(void* param); - -#else - -#ifdef HAVE_LIMITS_H -# include -#endif -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_FCNTL_H -# include -#endif -#ifdef HAVE_SYS_UIO_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_LINUX_TCP_H -# include -#elif HAVE_NETINET_TCP_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_SYS_UN_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_LINUX_CAN_H -# include -# define CAN_SOCKET_SUPPORT 1 -#endif -#ifdef HAVE_NET_IF -# include -#endif - -#ifdef HAVE_BSD_SENDFILE -#include -#endif -#ifdef HAVE_LINUX_SENDFILE -#if !defined(__USE_FILE_OFFSET64) -#include -#endif -#endif - -extern int -sendFd(int sock, int outfd); - -extern int -recvFd(int sock); - -#endif /* HAVE_WINSOCK2_H */ - -INLINE char * -hsnet_inet_ntoa( -#if defined(HAVE_WINSOCK2_H) - u_long addr -#elif defined(HAVE_IN_ADDR_T) - in_addr_t addr -#elif defined(HAVE_INTTYPES_H) - u_int32_t addr -#else - unsigned long addr -#endif - ) -{ - struct in_addr a; - a.s_addr = addr; - return inet_ntoa(a); -} - -#ifdef HAVE_GETADDRINFO -INLINE int -hsnet_getnameinfo(const struct sockaddr* a,socklen_t b, char* c, -# if defined(HAVE_WINSOCK2_H) - DWORD d, char* e, DWORD f, int g) -# else - socklen_t d, char* e, socklen_t f, int g) -# endif -{ - return getnameinfo(a,b,c,d,e,f,g); -} - -INLINE int -hsnet_getaddrinfo(const char *hostname, const char *servname, - const struct addrinfo *hints, struct addrinfo **res) -{ - return getaddrinfo(hostname, servname, hints, res); -} - -INLINE void -hsnet_freeaddrinfo(struct addrinfo *ai) -{ - freeaddrinfo(ai); -} -#endif - -#if !defined(IOV_MAX) -# define IOV_MAX 1024 -#endif - -#if !defined(SOCK_NONBLOCK) // Missing define in Bionic libc (Android) -# define SOCK_NONBLOCK O_NONBLOCK -#endif - -#endif /* HSNET_H */ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/include/HsNetworkConfig.h.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/include/HsNetworkConfig.h.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/include/HsNetworkConfig.h.in 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/include/HsNetworkConfig.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,177 +0,0 @@ -/* include/HsNetworkConfig.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the `accept4' function. */ -#undef HAVE_ACCEPT4 - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define to 1 if you have a BSDish sendfile(2) implementation. */ -#undef HAVE_BSD_SENDFILE - -/* Define to 1 if you have the declaration of `AI_ADDRCONFIG', and to 0 if you - don't. */ -#undef HAVE_DECL_AI_ADDRCONFIG - -/* Define to 1 if you have the declaration of `AI_ALL', and to 0 if you don't. - */ -#undef HAVE_DECL_AI_ALL - -/* Define to 1 if you have the declaration of `AI_NUMERICSERV', and to 0 if - you don't. */ -#undef HAVE_DECL_AI_NUMERICSERV - -/* Define to 1 if you have the declaration of `AI_V4MAPPED', and to 0 if you - don't. */ -#undef HAVE_DECL_AI_V4MAPPED - -/* Define to 1 if you have the declaration of `IPPROTO_IP', and to 0 if you - don't. */ -#undef HAVE_DECL_IPPROTO_IP - -/* Define to 1 if you have the declaration of `IPPROTO_IPV6', and to 0 if you - don't. */ -#undef HAVE_DECL_IPPROTO_IPV6 - -/* Define to 1 if you have the declaration of `IPPROTO_TCP', and to 0 if you - don't. */ -#undef HAVE_DECL_IPPROTO_TCP - -/* Define to 1 if you have the declaration of `IPV6_V6ONLY', and to 0 if you - don't. */ -#undef HAVE_DECL_IPV6_V6ONLY - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `gai_strerror' function. */ -#undef HAVE_GAI_STRERROR - -/* Define to 1 if you have the `getaddrinfo' function. */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `gethostent' function. */ -#undef HAVE_GETHOSTENT - -/* Define to 1 if you have getpeereid. */ -#undef HAVE_GETPEEREID - -/* Define to 1 if you have the `if_nametoindex' function. */ -#undef HAVE_IF_NAMETOINDEX - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if in_addr_t is available. */ -#undef HAVE_IN_ADDR_T - -/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ -#undef HAVE_LIBWS2_32 - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_CAN_H - -/* Define to 1 if you have a Linux sendfile(2) implementation. */ -#undef HAVE_LINUX_SENDFILE - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_TCP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_TCP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define to 1 if you have the `readlink' function. */ -#undef HAVE_READLINK - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */ -#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS - -/* Define to 1 if `msg_control' is a member of `struct msghdr'. */ -#undef HAVE_STRUCT_MSGHDR_MSG_CONTROL - -/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ -#undef HAVE_STRUCT_SOCKADDR_SA_LEN - -/* Define to 1 if you have both SO_PEERCRED and struct ucred. */ -#undef HAVE_STRUCT_UCRED - -/* Define to 1 if you have the `symlink' function. */ -#undef HAVE_SYMLINK - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK2_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WS2TCPIP_H - -/* Define to 1 if the `getaddrinfo' function needs WINVER set. */ -#undef NEED_WINVER_XP - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/install-sh cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/install-sh --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/install-sh 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/install-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,295 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2003-09-24.23 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename= -transform_arg= -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= - -usage="Usage: $0 [OPTION]... SRCFILE DSTFILE - or: $0 -d DIR1 DIR2... - -In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. -In the second, create the directory path DIR. - -Options: --b=TRANSFORMBASENAME --c copy source (using $cpprog) instead of moving (using $mvprog). --d create directories instead of installing files. --g GROUP $chgrp installed files to GROUP. --m MODE $chmod installed files to MODE. --o USER $chown installed files to USER. --s strip installed files (using $stripprog). --t=TRANSFORM ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - -c) instcmd=$cpprog - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit 0;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - --version) echo "$0 $scriptversion"; exit 0;; - - *) if test -z "$src"; then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if test -z "$src"; then - echo "$0: no input file specified." >&2 - exit 1 -fi - -# Protect names starting with `-'. -case $src in - -*) src=./$src ;; -esac - -if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - instcmd=: - chmodcmd= - else - instcmd=$mkdirprog - fi -else - # Waiting for this to be detected by the "$instcmd $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - dst=$dst/`basename "$src"` - fi -fi - -# This sed command emulates the dirname command. -dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. - -# Skip lots of stat calls in the usual case. -if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - test -d "$pathcomp" || $mkdirprog "$pathcomp" - pathcomp=$pathcomp/ - done -fi - -if test -n "$dir_arg"; then - $doit $instcmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - -else - # If we're going to rename the final executable, determine the name now. - if test -z "$transformarg"; then - dstfile=`basename "$dst"` - else - dstfile=`basename "$dst" $transformbasename \ - | sed $transformarg`$transformbasename - fi - - # don't allow the sed command to completely eliminate the filename. - test -z "$dstfile" && dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 - trap '(exit $?); exit' 1 2 13 15 - - # Move or copy the file name to the temp name - $doit $instcmd "$src" "$dsttmp" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $instcmd $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now remove or move aside any old file at destination location. We - # try this two ways since rm can't unlink itself on some systems and - # the destination file might be busy for other reasons. In this case, - # the final cleanup might fail but the new file should still install - # successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" -fi && - -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit -} - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/LICENSE cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/LICENSE --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/LICENSE 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/LICENSE 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -Copyright (c) 2002-2010, The University Court of the University of Glasgow. -Copyright (c) 2007-2010, Johan Tibell - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -- Neither name of the University nor the names of its contributors may be -used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF -GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/BSD.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/BSD.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/BSD.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/BSD.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,574 +0,0 @@ -{-# LANGUAGE CPP, ForeignFunctionInterface #-} -{-# OPTIONS_HADDOCK hide #-} -{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} ------------------------------------------------------------------------------ --- | --- Module : Network.BSD --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/network/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : experimental --- Portability : non-portable --- --- The "Network.BSD" module defines Haskell bindings to network --- programming functionality provided by BSD Unix derivatives. --- ------------------------------------------------------------------------------ - -#include "HsNet.h" -##include "HsNetDef.h" - -module Network.BSD {-# DEPRECATED "This platform dependent module is no longer supported." #-} - ( - -- * Host names - HostName - , getHostName - - , HostEntry(..) - , getHostByName - , getHostByAddr - , hostAddress - -#if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS) - , getHostEntries - - -- ** Low level functionality - , setHostEntry - , getHostEntry - , endHostEntry -#endif - - -- * Service names - , ServiceEntry(..) - , ServiceName - , getServiceByName - , getServiceByPort - , getServicePortNumber - -#if !defined(mingw32_HOST_OS) - , getServiceEntries - - -- ** Low level functionality - , getServiceEntry - , setServiceEntry - , endServiceEntry -#endif - - -- * Protocol names - , ProtocolName - , ProtocolNumber - , ProtocolEntry(..) - , getProtocolByName - , getProtocolByNumber - , getProtocolNumber - , defaultProtocol - -#if !defined(mingw32_HOST_OS) - , getProtocolEntries - -- ** Low level functionality - , setProtocolEntry - , getProtocolEntry - , endProtocolEntry -#endif - - -- * Port numbers - , PortNumber - - -- * Network names - , NetworkName - , NetworkAddr - , NetworkEntry(..) - -#if !defined(mingw32_HOST_OS) - , getNetworkByName - , getNetworkByAddr - , getNetworkEntries - -- ** Low level functionality - , setNetworkEntry - , getNetworkEntry - , endNetworkEntry -#endif - -#if defined(HAVE_IF_NAMETOINDEX) - -- * Interface names - , ifNameToIndex -#endif - - ) where - -import Network.Socket - -import Control.Concurrent (MVar, newMVar, withMVar) -import qualified Control.Exception as E -import Foreign.C.String (CString, peekCString, withCString) -#if defined(HAVE_WINSOCK2_H) -import Foreign.C.Types ( CShort ) -#endif -import Foreign.C.Types ( CInt(..), CULong(..), CSize(..) ) -import Foreign.Ptr (Ptr, nullPtr) -import Foreign.Storable (Storable(..)) -import Foreign.Marshal.Array (allocaArray0, peekArray0) -import Foreign.Marshal.Utils (with, fromBool) -import Data.Typeable -import System.IO.Error (ioeSetErrorString, mkIOError) -import System.IO.Unsafe (unsafePerformIO) - -import GHC.IO.Exception - -import Control.Monad (liftM) - -import Network.Socket.Internal (throwSocketErrorIfMinus1_) - --- --------------------------------------------------------------------------- --- Basic Types - -type ProtocolName = String - --- --------------------------------------------------------------------------- --- Service Database Access - --- Calling getServiceByName for a given service and protocol returns --- the systems service entry. This should be used to find the port --- numbers for standard protocols such as SMTP and FTP. The remaining --- three functions should be used for browsing the service database --- sequentially. - --- Calling setServiceEntry with True indicates that the service --- database should be left open between calls to getServiceEntry. To --- close the database a call to endServiceEntry is required. This --- database file is usually stored in the file /etc/services. - -data ServiceEntry = - ServiceEntry { - serviceName :: ServiceName, -- Official Name - serviceAliases :: [ServiceName], -- aliases - servicePort :: PortNumber, -- Port Number ( network byte order ) - serviceProtocol :: ProtocolName -- Protocol - } deriving (Show, Typeable) - -instance Storable ServiceEntry where - sizeOf _ = #const sizeof(struct servent) - alignment _ = alignment (undefined :: CInt) -- ??? - - peek p = do - s_name <- (#peek struct servent, s_name) p >>= peekCString - s_aliases <- (#peek struct servent, s_aliases) p - >>= peekArray0 nullPtr - >>= mapM peekCString - s_port <- (#peek struct servent, s_port) p - s_proto <- (#peek struct servent, s_proto) p >>= peekCString - return (ServiceEntry { - serviceName = s_name, - serviceAliases = s_aliases, -#if defined(HAVE_WINSOCK2_H) - servicePort = (fromIntegral (s_port :: CShort)), -#else - -- s_port is already in network byte order, but it - -- might be the wrong size. - servicePort = (fromIntegral (s_port :: CInt)), -#endif - serviceProtocol = s_proto - }) - - poke = throwUnsupportedOperationPoke "ServiceEntry" - - --- | Get service by name. -getServiceByName :: ServiceName -- Service Name - -> ProtocolName -- Protocol Name - -> IO ServiceEntry -- Service Entry -getServiceByName name proto = withLock $ do - withCString name $ \ cstr_name -> do - withCString proto $ \ cstr_proto -> do - throwNoSuchThingIfNull "Network.BSD.getServiceByName" "no such service entry" - $ c_getservbyname cstr_name cstr_proto - >>= peek - -foreign import CALLCONV unsafe "getservbyname" - c_getservbyname :: CString -> CString -> IO (Ptr ServiceEntry) - --- | Get the service given a 'PortNumber' and 'ProtocolName'. -getServiceByPort :: PortNumber -> ProtocolName -> IO ServiceEntry -getServiceByPort port proto = withLock $ do - withCString proto $ \ cstr_proto -> do - throwNoSuchThingIfNull "Network.BSD.getServiceByPort" "no such service entry" - $ c_getservbyport (fromIntegral port) cstr_proto - >>= peek - -foreign import CALLCONV unsafe "getservbyport" - c_getservbyport :: CInt -> CString -> IO (Ptr ServiceEntry) - --- | Get the 'PortNumber' corresponding to the 'ServiceName'. -getServicePortNumber :: ServiceName -> IO PortNumber -getServicePortNumber name = do - (ServiceEntry _ _ port _) <- getServiceByName name "tcp" - return port - -#if !defined(mingw32_HOST_OS) -getServiceEntry :: IO ServiceEntry -getServiceEntry = withLock $ do - throwNoSuchThingIfNull "Network.BSD.getServiceEntry" "no such service entry" - $ c_getservent - >>= peek - -foreign import ccall unsafe "getservent" c_getservent :: IO (Ptr ServiceEntry) - -setServiceEntry :: Bool -> IO () -setServiceEntry flg = withLock $ c_setservent (fromBool flg) - -foreign import ccall unsafe "setservent" c_setservent :: CInt -> IO () - -endServiceEntry :: IO () -endServiceEntry = withLock $ c_endservent - -foreign import ccall unsafe "endservent" c_endservent :: IO () - -getServiceEntries :: Bool -> IO [ServiceEntry] -getServiceEntries stayOpen = do - setServiceEntry stayOpen - getEntries (getServiceEntry) (endServiceEntry) -#endif - --- --------------------------------------------------------------------------- --- Protocol Entries - --- The following relate directly to the corresponding UNIX C --- calls for returning the protocol entries. The protocol entry is --- represented by the Haskell type ProtocolEntry. - --- As for setServiceEntry above, calling setProtocolEntry. --- determines whether or not the protocol database file, usually --- @/etc/protocols@, is to be kept open between calls of --- getProtocolEntry. Similarly, - -data ProtocolEntry = - ProtocolEntry { - protoName :: ProtocolName, -- Official Name - protoAliases :: [ProtocolName], -- aliases - protoNumber :: ProtocolNumber -- Protocol Number - } deriving (Read, Show, Typeable) - -instance Storable ProtocolEntry where - sizeOf _ = #const sizeof(struct protoent) - alignment _ = alignment (undefined :: CInt) -- ??? - - peek p = do - p_name <- (#peek struct protoent, p_name) p >>= peekCString - p_aliases <- (#peek struct protoent, p_aliases) p - >>= peekArray0 nullPtr - >>= mapM peekCString -#if defined(HAVE_WINSOCK2_H) - -- With WinSock, the protocol number is only a short; - -- hoist it in as such, but represent it on the Haskell side - -- as a CInt. - p_proto_short <- (#peek struct protoent, p_proto) p - let p_proto = fromIntegral (p_proto_short :: CShort) -#else - p_proto <- (#peek struct protoent, p_proto) p -#endif - return (ProtocolEntry { - protoName = p_name, - protoAliases = p_aliases, - protoNumber = p_proto - }) - - poke = throwUnsupportedOperationPoke "ProtocolEntry" - - -getProtocolByName :: ProtocolName -> IO ProtocolEntry -getProtocolByName name = withLock $ do - withCString name $ \ name_cstr -> do - throwNoSuchThingIfNull "Network.BSD.getProtocolByName" ("no such protocol name: " ++ name) - $ c_getprotobyname name_cstr - >>= peek - -foreign import CALLCONV unsafe "getprotobyname" - c_getprotobyname :: CString -> IO (Ptr ProtocolEntry) - - -getProtocolByNumber :: ProtocolNumber -> IO ProtocolEntry -getProtocolByNumber num = withLock $ do - throwNoSuchThingIfNull "Network.BSD.getProtocolByNumber" ("no such protocol number: " ++ show num) - $ c_getprotobynumber (fromIntegral num) - >>= peek - -foreign import CALLCONV unsafe "getprotobynumber" - c_getprotobynumber :: CInt -> IO (Ptr ProtocolEntry) - - -getProtocolNumber :: ProtocolName -> IO ProtocolNumber -getProtocolNumber proto = do - (ProtocolEntry _ _ num) <- getProtocolByName proto - return num - -#if !defined(mingw32_HOST_OS) -getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB -getProtocolEntry = withLock $ do - ent <- throwNoSuchThingIfNull "Network.BSD.getProtocolEntry" "no such protocol entry" - $ c_getprotoent - peek ent - -foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry) - -setProtocolEntry :: Bool -> IO () -- Keep DB Open ? -setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg) - -foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO () - -endProtocolEntry :: IO () -endProtocolEntry = withLock $ c_endprotoent - -foreign import ccall unsafe "endprotoent" c_endprotoent :: IO () - -getProtocolEntries :: Bool -> IO [ProtocolEntry] -getProtocolEntries stayOpen = withLock $ do - setProtocolEntry stayOpen - getEntries (getProtocolEntry) (endProtocolEntry) -#endif - --- --------------------------------------------------------------------------- --- Host lookups - -data HostEntry = - HostEntry { - hostName :: HostName, -- Official Name - hostAliases :: [HostName], -- aliases - hostFamily :: Family, -- Host Type (currently AF_INET) - hostAddresses :: [HostAddress] -- Set of Network Addresses (in network byte order) - } deriving (Read, Show, Typeable) - -instance Storable HostEntry where - sizeOf _ = #const sizeof(struct hostent) - alignment _ = alignment (undefined :: CInt) -- ??? - - peek p = do - h_name <- (#peek struct hostent, h_name) p >>= peekCString - h_aliases <- (#peek struct hostent, h_aliases) p - >>= peekArray0 nullPtr - >>= mapM peekCString - h_addrtype <- (#peek struct hostent, h_addrtype) p - -- h_length <- (#peek struct hostent, h_length) p - h_addr_list <- (#peek struct hostent, h_addr_list) p - >>= peekArray0 nullPtr - >>= mapM peek - return (HostEntry { - hostName = h_name, - hostAliases = h_aliases, -#if defined(HAVE_WINSOCK2_H) - hostFamily = unpackFamily (fromIntegral (h_addrtype :: CShort)), -#else - hostFamily = unpackFamily h_addrtype, -#endif - hostAddresses = h_addr_list - }) - - poke = throwUnsupportedOperationPoke "HostEntry" - - --- convenience function: -hostAddress :: HostEntry -> HostAddress -hostAddress (HostEntry nm _ _ ls) = - case ls of - [] -> error $ "Network.BSD.hostAddress: empty network address list for " ++ nm - (x:_) -> x - --- getHostByName must use the same lock as the *hostent functions --- may cause problems if called concurrently. - --- | Resolve a 'HostName' to IPv4 address. -getHostByName :: HostName -> IO HostEntry -getHostByName name = withLock $ do - withCString name $ \ name_cstr -> do - ent <- throwNoSuchThingIfNull "Network.BSD.getHostByName" "no such host entry" - $ c_gethostbyname name_cstr - peek ent - -foreign import CALLCONV safe "gethostbyname" - c_gethostbyname :: CString -> IO (Ptr HostEntry) - - --- The locking of gethostbyaddr is similar to gethostbyname. --- | Get a 'HostEntry' corresponding to the given address and family. --- Note that only IPv4 is currently supported. -getHostByAddr :: Family -> HostAddress -> IO HostEntry -getHostByAddr family addr = do - with addr $ \ ptr_addr -> withLock $ do - throwNoSuchThingIfNull "Network.BSD.getHostByAddr" "no such host entry" - $ c_gethostbyaddr ptr_addr (fromIntegral (sizeOf addr)) (packFamily family) - >>= peek - -foreign import CALLCONV safe "gethostbyaddr" - c_gethostbyaddr :: Ptr HostAddress -> CInt -> CInt -> IO (Ptr HostEntry) - -#if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS) -getHostEntry :: IO HostEntry -getHostEntry = withLock $ do - throwNoSuchThingIfNull "Network.BSD.getHostEntry" "unable to retrieve host entry" - $ c_gethostent - >>= peek - -foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry) - -setHostEntry :: Bool -> IO () -setHostEntry flg = withLock $ c_sethostent (fromBool flg) - -foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO () - -endHostEntry :: IO () -endHostEntry = withLock $ c_endhostent - -foreign import ccall unsafe "endhostent" c_endhostent :: IO () - -getHostEntries :: Bool -> IO [HostEntry] -getHostEntries stayOpen = do - setHostEntry stayOpen - getEntries (getHostEntry) (endHostEntry) -#endif - --- --------------------------------------------------------------------------- --- Accessing network information - --- Same set of access functions as for accessing host,protocol and --- service system info, this time for the types of networks supported. - --- network addresses are represented in host byte order. -type NetworkAddr = CULong - -type NetworkName = String - -data NetworkEntry = - NetworkEntry { - networkName :: NetworkName, -- official name - networkAliases :: [NetworkName], -- aliases - networkFamily :: Family, -- type - networkAddress :: NetworkAddr - } deriving (Read, Show, Typeable) - -instance Storable NetworkEntry where - sizeOf _ = #const sizeof(struct hostent) - alignment _ = alignment (undefined :: CInt) -- ??? - - peek p = do - n_name <- (#peek struct netent, n_name) p >>= peekCString - n_aliases <- (#peek struct netent, n_aliases) p - >>= peekArray0 nullPtr - >>= mapM peekCString - n_addrtype <- (#peek struct netent, n_addrtype) p - n_net <- (#peek struct netent, n_net) p - return (NetworkEntry { - networkName = n_name, - networkAliases = n_aliases, - networkFamily = unpackFamily (fromIntegral - (n_addrtype :: CInt)), - networkAddress = n_net - }) - - poke = throwUnsupportedOperationPoke "NetworkEntry" - - -#if !defined(mingw32_HOST_OS) -getNetworkByName :: NetworkName -> IO NetworkEntry -getNetworkByName name = withLock $ do - withCString name $ \ name_cstr -> do - throwNoSuchThingIfNull "Network.BSD.getNetworkByName" "no such network entry" - $ c_getnetbyname name_cstr - >>= peek - -foreign import ccall unsafe "getnetbyname" - c_getnetbyname :: CString -> IO (Ptr NetworkEntry) - -getNetworkByAddr :: NetworkAddr -> Family -> IO NetworkEntry -getNetworkByAddr addr family = withLock $ do - throwNoSuchThingIfNull "Network.BSD.getNetworkByAddr" "no such network entry" - $ c_getnetbyaddr addr (packFamily family) - >>= peek - -foreign import ccall unsafe "getnetbyaddr" - c_getnetbyaddr :: NetworkAddr -> CInt -> IO (Ptr NetworkEntry) - -getNetworkEntry :: IO NetworkEntry -getNetworkEntry = withLock $ do - throwNoSuchThingIfNull "Network.BSD.getNetworkEntry" "no more network entries" - $ c_getnetent - >>= peek - -foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry) - --- | Open the network name database. The parameter specifies --- whether a connection is maintained open between various --- networkEntry calls -setNetworkEntry :: Bool -> IO () -setNetworkEntry flg = withLock $ c_setnetent (fromBool flg) - -foreign import ccall unsafe "setnetent" c_setnetent :: CInt -> IO () - --- | Close the connection to the network name database. -endNetworkEntry :: IO () -endNetworkEntry = withLock $ c_endnetent - -foreign import ccall unsafe "endnetent" c_endnetent :: IO () - --- | Get the list of network entries. -getNetworkEntries :: Bool -> IO [NetworkEntry] -getNetworkEntries stayOpen = do - setNetworkEntry stayOpen - getEntries (getNetworkEntry) (endNetworkEntry) -#endif - --- Mutex for name service lockdown - -{-# NOINLINE lock #-} -lock :: MVar () -lock = unsafePerformIO $ withSocketsDo $ newMVar () - -withLock :: IO a -> IO a -withLock act = withMVar lock (\_ -> act) - --- --------------------------------------------------------------------------- --- Miscellaneous Functions - --- | Calling getHostName returns the standard host name for the current --- processor, as set at boot time. - -getHostName :: IO HostName -getHostName = do - let size = 256 - allocaArray0 size $ \ cstr -> do - throwSocketErrorIfMinus1_ "Network.BSD.getHostName" $ c_gethostname cstr (fromIntegral size) - peekCString cstr - -foreign import CALLCONV unsafe "gethostname" - c_gethostname :: CString -> CSize -> IO CInt - --- Helper function used by the exported functions that provides a --- Haskellised view of the enumerator functions: - -getEntries :: IO a -- read - -> IO () -- at end - -> IO [a] -getEntries getOne atEnd = loop - where - loop = do - vv <- E.catch (liftM Just getOne) - (\ e -> let _types = e :: IOException in return Nothing) - case vv of - Nothing -> return [] - Just v -> loop >>= \ vs -> atEnd >> return (v:vs) - - -throwNoSuchThingIfNull :: String -> String -> IO (Ptr a) -> IO (Ptr a) -throwNoSuchThingIfNull loc desc act = do - ptr <- act - if (ptr == nullPtr) - then ioError (ioeSetErrorString (mkIOError NoSuchThing loc Nothing Nothing) desc) - else return ptr - -throwUnsupportedOperationPoke :: String -> Ptr a -> a -> IO () -throwUnsupportedOperationPoke typ _ _ = - ioError $ ioeSetErrorString ioe "Operation not implemented" - where - ioe = mkIOError UnsupportedOperation - ("Network.BSD: instance Storable " ++ typ ++ ": poke") - Nothing - Nothing diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Internal.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Internal.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Internal.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Internal.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -{-# LANGUAGE CPP, ForeignFunctionInterface #-} - --- | --- Module : Network.Socket.ByteString.Internal --- Copyright : (c) Johan Tibell 2007-2010 --- License : BSD-style --- --- Maintainer : johan.tibell@gmail.com --- Stability : stable --- Portability : portable --- -module Network.Socket.ByteString.Internal - ( - mkInvalidRecvArgError -#if !defined(mingw32_HOST_OS) - , c_writev - , c_sendmsg -#endif - , waitWhen0 - ) where - -import System.IO.Error (ioeSetErrorString, mkIOError) - -#if !defined(mingw32_HOST_OS) -import Foreign.C.Types (CInt(..)) -import System.Posix.Types (CSsize(..)) -import Foreign.Ptr (Ptr) - -import Network.Socket.ByteString.IOVec (IOVec) -import Network.Socket.ByteString.MsgHdr (MsgHdr) -#endif - -import Control.Concurrent (threadWaitWrite, rtsSupportsBoundThreads) -import Control.Monad (when) -import GHC.IO.Exception (IOErrorType(..)) -import Network.Socket.Types - -mkInvalidRecvArgError :: String -> IOError -mkInvalidRecvArgError loc = ioeSetErrorString (mkIOError - InvalidArgument - loc Nothing Nothing) "non-positive length" - -#if !defined(mingw32_HOST_OS) -foreign import ccall unsafe "writev" - c_writev :: CInt -> Ptr IOVec -> CInt -> IO CSsize - -foreign import ccall unsafe "sendmsg" - c_sendmsg :: CInt -> Ptr MsgHdr -> CInt -> IO CSsize -#endif - -waitWhen0 :: Int -> Socket -> IO () -waitWhen0 0 s = when rtsSupportsBoundThreads $ do - let fd = fromIntegral $ fdSocket s - threadWaitWrite fd -waitWhen0 _ _ = return () diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/IOVec.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/IOVec.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/IOVec.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/IOVec.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -{-# OPTIONS_GHC -funbox-strict-fields #-} - --- | Support module for the POSIX writev system call. -module Network.Socket.ByteString.IOVec - ( IOVec(..) - ) where - -import Foreign.C.Types (CChar, CInt, CSize) -import Foreign.Ptr (Ptr) -import Foreign.Storable (Storable(..)) - -#include -#include - -data IOVec = IOVec - { iovBase :: !(Ptr CChar) - , iovLen :: !CSize - } - -instance Storable IOVec where - sizeOf _ = (#const sizeof(struct iovec)) - alignment _ = alignment (undefined :: CInt) - - peek p = do - base <- (#peek struct iovec, iov_base) p - len <- (#peek struct iovec, iov_len) p - return $ IOVec base len - - poke p iov = do - (#poke struct iovec, iov_base) p (iovBase iov) - (#poke struct iovec, iov_len) p (iovLen iov) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Posix.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Posix.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Posix.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Posix.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE OverloadedStrings #-} - -module Network.Socket.ByteString.Lazy.Posix - ( - -- * Send data to a socket - send - , sendAll - ) where - -import Control.Monad (liftM, when) -import qualified Data.ByteString.Lazy as L -import Data.ByteString.Lazy.Internal (ByteString(..)) -import Data.ByteString.Unsafe (unsafeUseAsCStringLen) -import Data.Int (Int64) -import Foreign.Marshal.Array (allocaArray) -import Foreign.Ptr (plusPtr) -import Foreign.Storable (Storable(..)) - -import Network.Socket (Socket(..)) -import Network.Socket.ByteString.IOVec (IOVec(IOVec)) -import Network.Socket.ByteString.Internal (c_writev, waitWhen0) -import Network.Socket.Internal - --- ----------------------------------------------------------------------------- --- Sending - -send :: Socket -- ^ Connected socket - -> ByteString -- ^ Data to send - -> IO Int64 -- ^ Number of bytes sent -send sock@(MkSocket fd _ _ _ _) s = do - let cs = take maxNumChunks (L.toChunks s) - len = length cs - liftM fromIntegral . allocaArray len $ \ptr -> - withPokes cs ptr $ \niovs -> - throwSocketErrorWaitWrite sock "writev" $ - c_writev (fromIntegral fd) ptr niovs - where - withPokes ss p f = loop ss p 0 0 - where loop (c:cs) q k !niovs - | k < maxNumBytes = - unsafeUseAsCStringLen c $ \(ptr,len) -> do - poke q $ IOVec ptr (fromIntegral len) - loop cs (q `plusPtr` sizeOf (undefined :: IOVec)) - (k + fromIntegral len) (niovs + 1) - | otherwise = f niovs - loop _ _ _ niovs = f niovs - maxNumBytes = 4194304 :: Int -- maximum number of bytes to transmit in one system call - maxNumChunks = 1024 :: Int -- maximum number of chunks to transmit in one system call - -sendAll :: Socket -- ^ Connected socket - -> ByteString -- ^ Data to send - -> IO () -sendAll _ "" = return () -sendAll sock bs = do - sent <- send sock bs - waitWhen0 (fromIntegral sent) sock - when (sent >= 0) $ sendAll sock $ L.drop sent bs diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Windows.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Windows.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Windows.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Lazy/Windows.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE OverloadedStrings #-} - -module Network.Socket.ByteString.Lazy.Windows - ( - -- * Send data to a socket - send - , sendAll - ) where - -import Control.Applicative ((<$>)) -import Control.Monad (when) -import qualified Data.ByteString as S -import qualified Data.ByteString.Lazy as L -import Data.Int (Int64) - -import Network.Socket (Socket(..)) -import qualified Network.Socket.ByteString as Socket -import Network.Socket.ByteString.Internal (waitWhen0) - --- ----------------------------------------------------------------------------- --- Sending - -send :: Socket -- ^ Connected socket - -> L.ByteString -- ^ Data to send - -> IO Int64 -- ^ Number of bytes sent -send sock s = do - fromIntegral <$> case L.toChunks s of - -- TODO: Consider doing nothing if the string is empty. - [] -> Socket.send sock S.empty - (x:_) -> Socket.send sock x - -sendAll :: Socket -- ^ Connected socket - -> L.ByteString -- ^ Data to send - -> IO () -sendAll _ "" = return () -sendAll sock bs = do - sent <- send sock bs - waitWhen0 (fromIntegral sent) sock - when (sent >= 0) $ sendAll sock $ L.drop sent bs diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Lazy.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Lazy.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/Lazy.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/Lazy.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -{-# LANGUAGE CPP #-} - --- | --- Module : Network.Socket.ByteString.Lazy --- Copyright : (c) Bryan O'Sullivan 2009 --- License : BSD-style --- --- Maintainer : bos@serpentine.com --- Stability : experimental --- Portability : POSIX, GHC --- --- This module provides access to the BSD /socket/ interface. This --- module is generally more efficient than the 'String' based network --- functions in 'Network.Socket'. For detailed documentation, consult --- your favorite POSIX socket reference. All functions communicate --- failures by converting the error number to 'System.IO.IOError'. --- --- This module is made to be imported with 'Network.Socket' like so: --- --- > import Network.Socket hiding (send, sendTo, recv, recvFrom) --- > import Network.Socket.ByteString.Lazy --- > import Prelude hiding (getContents) --- -module Network.Socket.ByteString.Lazy - ( - -- * Send data to a socket - send - , sendAll - , - - -- * Receive data from a socket - getContents - , recv - ) where - -import Control.Monad (liftM) -import Data.ByteString.Lazy.Internal (ByteString(..), defaultChunkSize) -import Data.Int (Int64) -import Network.Socket (Socket(..), ShutdownCmd(..), shutdown) -import Prelude hiding (getContents) -import System.IO.Unsafe (unsafeInterleaveIO) - -import qualified Data.ByteString as S -import qualified Network.Socket.ByteString as N - -#if defined(mingw32_HOST_OS) -import Network.Socket.ByteString.Lazy.Windows (send, sendAll) -#else -import Network.Socket.ByteString.Lazy.Posix (send, sendAll) -#endif - --- ----------------------------------------------------------------------------- --- Receiving - --- | Receive data from the socket. The socket must be in a connected --- state. Data is received on demand, in chunks; each chunk will be --- sized to reflect the amount of data received by individual 'recv' --- calls. --- --- All remaining data from the socket is consumed. When there is no --- more data to be received, the receiving side of the socket is shut --- down. If there is an error and an exception is thrown, the socket --- is not shut down. -getContents :: Socket -- ^ Connected socket - -> IO ByteString -- ^ Data received -getContents sock = loop where - loop = unsafeInterleaveIO $ do - s <- N.recv sock defaultChunkSize - if S.null s - then shutdown sock ShutdownReceive >> return Empty - else Chunk s `liftM` loop - --- | Receive data from the socket. The socket must be in a connected --- state. This function may return fewer bytes than specified. If --- the received data is longer than the specified length, it may be --- discarded depending on the type of socket. This function may block --- until a message arrives. --- --- If there is no more data to be received, returns an empty 'ByteString'. --- --- Receiving data from closed socket may lead to undefined behaviour. -recv :: Socket -- ^ Connected socket - -> Int64 -- ^ Maximum number of bytes to receive - -> IO ByteString -- ^ Data received -recv sock nbytes = chunk `liftM` N.recv sock (fromIntegral nbytes) where - chunk k - | S.null k = Empty - | otherwise = Chunk k Empty diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/MsgHdr.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/MsgHdr.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString/MsgHdr.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString/MsgHdr.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -funbox-strict-fields #-} - --- | Support module for the POSIX 'sendmsg' system call. -module Network.Socket.ByteString.MsgHdr - ( MsgHdr(..) - ) where - -#include -#include - -import Foreign.C.Types (CInt, CSize, CUInt) -import Foreign.Ptr (Ptr) -import Foreign.Storable (Storable(..)) -import Network.Socket (SockAddr) -import Network.Socket.Internal (zeroMemory) - -import Network.Socket.ByteString.IOVec (IOVec) - --- We don't use msg_control, msg_controllen, and msg_flags as these --- don't exist on OpenSolaris. -data MsgHdr = MsgHdr - { msgName :: !(Ptr SockAddr) - , msgNameLen :: !CUInt - , msgIov :: !(Ptr IOVec) - , msgIovLen :: !CSize - } - -instance Storable MsgHdr where - sizeOf _ = (#const sizeof(struct msghdr)) - alignment _ = alignment (undefined :: CInt) - - peek p = do - name <- (#peek struct msghdr, msg_name) p - nameLen <- (#peek struct msghdr, msg_namelen) p - iov <- (#peek struct msghdr, msg_iov) p - iovLen <- (#peek struct msghdr, msg_iovlen) p - return $ MsgHdr name nameLen iov iovLen - - poke p mh = do - -- We need to zero the msg_control, msg_controllen, and msg_flags - -- fields, but they only exist on some platforms (e.g. not on - -- Solaris). Instead of using CPP, we zero the entire struct. - zeroMemory p (#const sizeof(struct msghdr)) - (#poke struct msghdr, msg_name) p (msgName mh) - (#poke struct msghdr, msg_namelen) p (msgNameLen mh) - (#poke struct msghdr, msg_iov) p (msgIov mh) - (#poke struct msghdr, msg_iovlen) p (msgIovLen mh) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/ByteString.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/ByteString.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,285 +0,0 @@ -{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -{-# LANGUAGE CPP, ForeignFunctionInterface #-} -{-# LANGUAGE OverloadedStrings #-} - -#include "HsNet.h" - --- | --- Module : Network.Socket.ByteString --- Copyright : (c) Johan Tibell 2007-2010 --- License : BSD-style --- --- Maintainer : johan.tibell@gmail.com --- Stability : stable --- Portability : portable --- --- This module provides access to the BSD /socket/ interface. This --- module is generally more efficient than the 'String' based network --- functions in 'Network.Socket'. For detailed documentation, consult --- your favorite POSIX socket reference. All functions communicate --- failures by converting the error number to 'System.IO.IOError'. --- --- This module is made to be imported with 'Network.Socket' like so: --- --- > import Network.Socket hiding (send, sendTo, recv, recvFrom) --- > import Network.Socket.ByteString --- -module Network.Socket.ByteString - ( - -- * Send data to a socket - send - , sendAll - , sendTo - , sendAllTo - - -- ** Vectored I/O - -- $vectored - , sendMany - , sendManyTo - - -- * Receive data from a socket - , recv - , recvFrom - ) where - -import Control.Exception as E (catch, throwIO) -import Control.Monad (when) -import Data.ByteString (ByteString) -import Data.ByteString.Internal (createAndTrim) -import Data.ByteString.Unsafe (unsafeUseAsCStringLen) -import Foreign.Marshal.Alloc (allocaBytes) -import Foreign.Ptr (castPtr) -import Network.Socket (sendBuf, sendBufTo, recvBuf, recvBufFrom) -import System.IO.Error (isEOFError) - -import qualified Data.ByteString as B - -import Network.Socket.ByteString.Internal -import Network.Socket.Internal -import Network.Socket.Types - -#if !defined(mingw32_HOST_OS) -import Control.Monad (liftM, zipWithM_) -import Foreign.Marshal.Array (allocaArray) -import Foreign.Marshal.Utils (with) -import Foreign.Ptr (Ptr, plusPtr) -import Foreign.Storable (Storable(..)) - -import Network.Socket.ByteString.IOVec (IOVec(..)) -import Network.Socket.ByteString.MsgHdr (MsgHdr(..)) -#endif - --- ---------------------------------------------------------------------------- --- Sending - --- | Send data to the socket. The socket must be connected to a --- remote socket. Returns the number of bytes sent. Applications are --- responsible for ensuring that all data has been sent. --- --- Sending data to closed socket may lead to undefined behaviour. -send :: Socket -- ^ Connected socket - -> ByteString -- ^ Data to send - -> IO Int -- ^ Number of bytes sent -send sock xs = unsafeUseAsCStringLen xs $ \(str, len) -> - sendBuf sock (castPtr str) len - --- | Send data to the socket. The socket must be connected to a --- remote socket. Unlike 'send', this function continues to send data --- until either all data has been sent or an error occurs. On error, --- an exception is raised, and there is no way to determine how much --- data, if any, was successfully sent. --- --- Sending data to closed socket may lead to undefined behaviour. -sendAll :: Socket -- ^ Connected socket - -> ByteString -- ^ Data to send - -> IO () -sendAll _ "" = return () -sendAll sock bs = do - sent <- send sock bs - waitWhen0 sent sock - when (sent >= 0) $ sendAll sock $ B.drop sent bs - --- | Send data to the socket. The recipient can be specified --- explicitly, so the socket need not be in a connected state. --- Returns the number of bytes sent. Applications are responsible for --- ensuring that all data has been sent. --- --- Sending data to closed socket may lead to undefined behaviour. -sendTo :: Socket -- ^ Socket - -> ByteString -- ^ Data to send - -> SockAddr -- ^ Recipient address - -> IO Int -- ^ Number of bytes sent -sendTo sock xs addr = - unsafeUseAsCStringLen xs $ \(str, len) -> sendBufTo sock str len addr - --- | Send data to the socket. The recipient can be specified --- explicitly, so the socket need not be in a connected state. Unlike --- 'sendTo', this function continues to send data until either all --- data has been sent or an error occurs. On error, an exception is --- raised, and there is no way to determine how much data, if any, was --- successfully sent. --- --- Sending data to closed socket may lead to undefined behaviour. -sendAllTo :: Socket -- ^ Socket - -> ByteString -- ^ Data to send - -> SockAddr -- ^ Recipient address - -> IO () -sendAllTo _ "" _ = return () -sendAllTo sock xs addr = do - sent <- sendTo sock xs addr - waitWhen0 sent sock - when (sent >= 0) $ sendAllTo sock (B.drop sent xs) addr - --- ---------------------------------------------------------------------------- --- ** Vectored I/O - --- $vectored --- --- Vectored I\/O, also known as scatter\/gather I\/O, allows multiple --- data segments to be sent using a single system call, without first --- concatenating the segments. For example, given a list of --- @ByteString@s, @xs@, --- --- > sendMany sock xs --- --- is equivalent to --- --- > sendAll sock (concat xs) --- --- but potentially more efficient. --- --- Vectored I\/O are often useful when implementing network protocols --- that, for example, group data into segments consisting of one or --- more fixed-length headers followed by a variable-length body. - --- | Send data to the socket. The socket must be in a connected --- state. The data is sent as if the parts have been concatenated. --- This function continues to send data until either all data has been --- sent or an error occurs. On error, an exception is raised, and --- there is no way to determine how much data, if any, was --- successfully sent. --- --- Sending data to closed socket may lead to undefined behaviour. -sendMany :: Socket -- ^ Connected socket - -> [ByteString] -- ^ Data to send - -> IO () -#if !defined(mingw32_HOST_OS) -sendMany _ [] = return () -sendMany sock@(MkSocket fd _ _ _ _) cs = do - sent <- sendManyInner - waitWhen0 sent sock - when (sent >= 0) $ sendMany sock (remainingChunks sent cs) - where - sendManyInner = - liftM fromIntegral . withIOVec cs $ \(iovsPtr, iovsLen) -> - throwSocketErrorWaitWrite sock "Network.Socket.ByteString.sendMany" $ - c_writev (fromIntegral fd) iovsPtr - (fromIntegral (min iovsLen (#const IOV_MAX))) -#else -sendMany sock = sendAll sock . B.concat -#endif - --- | Send data to the socket. The recipient can be specified --- explicitly, so the socket need not be in a connected state. The --- data is sent as if the parts have been concatenated. This function --- continues to send data until either all data has been sent or an --- error occurs. On error, an exception is raised, and there is no --- way to determine how much data, if any, was successfully sent. --- --- Sending data to closed socket may lead to undefined behaviour. -sendManyTo :: Socket -- ^ Socket - -> [ByteString] -- ^ Data to send - -> SockAddr -- ^ Recipient address - -> IO () -#if !defined(mingw32_HOST_OS) -sendManyTo _ [] _ = return () -sendManyTo sock@(MkSocket fd _ _ _ _) cs addr = do - sent <- liftM fromIntegral sendManyToInner - waitWhen0 sent sock - when (sent >= 0) $ sendManyTo sock (remainingChunks sent cs) addr - where - sendManyToInner = - withSockAddr addr $ \addrPtr addrSize -> - withIOVec cs $ \(iovsPtr, iovsLen) -> do - let msgHdr = MsgHdr - addrPtr (fromIntegral addrSize) - iovsPtr (fromIntegral iovsLen) - with msgHdr $ \msgHdrPtr -> - throwSocketErrorWaitWrite sock "Network.Socket.ByteString.sendManyTo" $ - c_sendmsg (fromIntegral fd) msgHdrPtr 0 -#else -sendManyTo sock cs = sendAllTo sock (B.concat cs) -#endif - --- ---------------------------------------------------------------------------- --- Receiving - --- | Receive data from the socket. The socket must be in a connected --- state. This function may return fewer bytes than specified. If --- the message is longer than the specified length, it may be --- discarded depending on the type of socket. This function may block --- until a message arrives. --- --- Considering hardware and network realities, the maximum number of bytes to --- receive should be a small power of 2, e.g., 4096. --- --- For TCP sockets, a zero length return value means the peer has --- closed its half side of the connection. --- --- Receiving data from closed socket may lead to undefined behaviour. -recv :: Socket -- ^ Connected socket - -> Int -- ^ Maximum number of bytes to receive - -> IO ByteString -- ^ Data received -recv sock nbytes - | nbytes < 0 = ioError (mkInvalidRecvArgError "Network.Socket.ByteString.recv") - | otherwise = createAndTrim nbytes $ \ptr -> - E.catch - (recvBuf sock ptr nbytes) - (\e -> if isEOFError e then return 0 else throwIO e) - --- | Receive data from the socket. The socket need not be in a --- connected state. Returns @(bytes, address)@ where @bytes@ is a --- 'ByteString' representing the data received and @address@ is a --- 'SockAddr' representing the address of the sending socket. --- --- Receiving data from closed socket may lead to undefined behaviour. -recvFrom :: Socket -- ^ Socket - -> Int -- ^ Maximum number of bytes to receive - -> IO (ByteString, SockAddr) -- ^ Data received and sender address -recvFrom sock nbytes = - allocaBytes nbytes $ \ptr -> do - (len, sockaddr) <- recvBufFrom sock ptr nbytes - str <- B.packCStringLen (ptr, len) - return (str, sockaddr) - --- ---------------------------------------------------------------------------- --- Not exported - -#if !defined(mingw32_HOST_OS) --- | Suppose we try to transmit a list of chunks @cs@ via a gathering write --- operation and find that @n@ bytes were sent. Then @remainingChunks n cs@ is --- list of chunks remaining to be sent. -remainingChunks :: Int -> [ByteString] -> [ByteString] -remainingChunks _ [] = [] -remainingChunks i (x:xs) - | i < len = B.drop i x : xs - | otherwise = let i' = i - len in i' `seq` remainingChunks i' xs - where - len = B.length x - --- | @withIOVec cs f@ executes the computation @f@, passing as argument a pair --- consisting of a pointer to a temporarily allocated array of pointers to --- IOVec made from @cs@ and the number of pointers (@length cs@). --- /Unix only/. -withIOVec :: [ByteString] -> ((Ptr IOVec, Int) -> IO a) -> IO a -withIOVec cs f = - allocaArray csLen $ \aPtr -> do - zipWithM_ pokeIov (ptrs aPtr) cs - f (aPtr, csLen) - where - csLen = length cs - ptrs = iterate (`plusPtr` sizeOf (undefined :: IOVec)) - pokeIov ptr s = - unsafeUseAsCStringLen s $ \(sPtr, sLen) -> - poke ptr $ IOVec sPtr (fromIntegral sLen) -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/Internal.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/Internal.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/Internal.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/Internal.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,277 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE ForeignFunctionInterface #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} ------------------------------------------------------------------------------ --- | --- Module : Network.Socket.Internal --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/network/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A module containing semi-public 'Network.Socket' internals. --- Modules which extend the 'Network.Socket' module will need to use --- this module while ideally most users will be able to make do with --- the public interface. --- ------------------------------------------------------------------------------ - -#include "HsNet.h" -##include "HsNetDef.h" - -module Network.Socket.Internal - ( - -- * Socket addresses - HostAddress -#if defined(IPV6_SOCKET_SUPPORT) - , HostAddress6 - , FlowInfo - , ScopeID -#endif - , PortNumber(..) - , SockAddr(..) - - , peekSockAddr - , pokeSockAddr - , sizeOfSockAddr - , sizeOfSockAddrByFamily - , withSockAddr - , withNewSockAddr - - -- * Protocol families - , Family(..) - - -- * Socket error functions -#if defined(HAVE_WINSOCK2_H) - , c_getLastError -#endif - , throwSocketError - , throwSocketErrorCode - - -- * Guards for socket operations that may fail - , throwSocketErrorIfMinus1_ - , throwSocketErrorIfMinus1Retry - , throwSocketErrorIfMinus1Retry_ - , throwSocketErrorIfMinus1RetryMayBlock - - -- ** Guards that wait and retry if the operation would block - -- | These guards are based on 'throwSocketErrorIfMinus1RetryMayBlock'. - -- They wait for socket readiness if the action fails with @EWOULDBLOCK@ - -- or similar. - , throwSocketErrorWaitRead - , throwSocketErrorWaitWrite - - -- * Initialization - , withSocketsDo - - -- * Low-level helpers - , zeroMemory - ) where - -import Foreign.C.Error (throwErrno, throwErrnoIfMinus1Retry, - throwErrnoIfMinus1RetryMayBlock, throwErrnoIfMinus1_, - Errno(..), errnoToIOError) -#if defined(HAVE_WINSOCK2_H) -import Foreign.C.String (peekCString) -import Foreign.Ptr (Ptr) -#endif -import Foreign.C.Types (CInt(..)) -import GHC.Conc (threadWaitRead, threadWaitWrite) - -#if defined(HAVE_WINSOCK2_H) -import Control.Exception ( evaluate ) -import System.IO.Unsafe ( unsafePerformIO ) -import Control.Monad ( when ) -# if __GLASGOW_HASKELL__ >= 707 -import GHC.IO.Exception ( IOErrorType(..) ) -# else -import GHC.IOBase ( IOErrorType(..) ) -# endif -import Foreign.C.Types ( CChar ) -import System.IO.Error ( ioeSetErrorString, mkIOError ) -#endif - -import Network.Socket.Types - --- --------------------------------------------------------------------- --- Guards for socket operations that may fail - --- | Throw an 'IOError' corresponding to the current socket error. -throwSocketError :: String -- ^ textual description of the error location - -> IO a - --- | Like 'throwSocketError', but the error code is supplied as an argument. --- --- On Windows, do not use errno. Use a system error code instead. -throwSocketErrorCode :: String -> CInt -> IO a - --- | Throw an 'IOError' corresponding to the current socket error if --- the IO action returns a result of @-1@. Discards the result of the --- IO action after error handling. -throwSocketErrorIfMinus1_ - :: (Eq a, Num a) - => String -- ^ textual description of the location - -> IO a -- ^ the 'IO' operation to be executed - -> IO () - -{-# SPECIALIZE throwSocketErrorIfMinus1_ :: String -> IO CInt -> IO () #-} - --- | Throw an 'IOError' corresponding to the current socket error if --- the IO action returns a result of @-1@, but retries in case of an --- interrupted operation. -throwSocketErrorIfMinus1Retry - :: (Eq a, Num a) - => String -- ^ textual description of the location - -> IO a -- ^ the 'IO' operation to be executed - -> IO a - -{-# SPECIALIZE throwSocketErrorIfMinus1Retry :: String -> IO CInt -> IO CInt #-} - --- | Throw an 'IOError' corresponding to the current socket error if --- the IO action returns a result of @-1@, but retries in case of an --- interrupted operation. Discards the result of the IO action after --- error handling. -throwSocketErrorIfMinus1Retry_ - :: (Eq a, Num a) - => String -- ^ textual description of the location - -> IO a -- ^ the 'IO' operation to be executed - -> IO () -throwSocketErrorIfMinus1Retry_ loc m = - throwSocketErrorIfMinus1Retry loc m >> return () -{-# SPECIALIZE throwSocketErrorIfMinus1Retry_ :: String -> IO CInt -> IO () #-} - --- | Throw an 'IOError' corresponding to the current socket error if --- the IO action returns a result of @-1@, but retries in case of an --- interrupted operation. Checks for operations that would block and --- executes an alternative action before retrying in that case. -throwSocketErrorIfMinus1RetryMayBlock - :: (Eq a, Num a) - => String -- ^ textual description of the location - -> IO b -- ^ action to execute before retrying if an - -- immediate retry would block - -> IO a -- ^ the 'IO' operation to be executed - -> IO a - -{-# SPECIALIZE throwSocketErrorIfMinus1RetryMayBlock - :: String -> IO b -> IO CInt -> IO CInt #-} - -#if (!defined(HAVE_WINSOCK2_H)) - -throwSocketErrorIfMinus1RetryMayBlock name on_block act = - throwErrnoIfMinus1RetryMayBlock name act on_block - -throwSocketErrorIfMinus1Retry = throwErrnoIfMinus1Retry - -throwSocketErrorIfMinus1_ = throwErrnoIfMinus1_ - -throwSocketError = throwErrno - -throwSocketErrorCode loc errno = - ioError (errnoToIOError loc (Errno errno) Nothing Nothing) - -#else - -throwSocketErrorIfMinus1RetryMayBlock name _ act - = throwSocketErrorIfMinus1Retry name act - -throwSocketErrorIfMinus1_ name act = do - throwSocketErrorIfMinus1Retry name act - return () - -# if defined(HAVE_WINSOCK2_H) -throwSocketErrorIfMinus1Retry name act = do - r <- act - if (r == -1) - then do - rc <- c_getLastError - case rc of - #{const WSANOTINITIALISED} -> do - withSocketsDo (return ()) - r <- act - if (r == -1) - then throwSocketError name - else return r - _ -> throwSocketError name - else return r - -throwSocketErrorCode name rc = do - pstr <- c_getWSError rc - str <- peekCString pstr - ioError (ioeSetErrorString (mkIOError OtherError name Nothing Nothing) str) - -throwSocketError name = - c_getLastError >>= throwSocketErrorCode name - -foreign import CALLCONV unsafe "WSAGetLastError" - c_getLastError :: IO CInt - -foreign import ccall unsafe "getWSErrorDescr" - c_getWSError :: CInt -> IO (Ptr CChar) - - -# else -throwSocketErrorIfMinus1Retry = throwErrnoIfMinus1Retry -throwSocketError = throwErrno -throwSocketErrorCode loc errno = - ioError (errnoToIOError loc (Errno errno) Nothing Nothing) -# endif -#endif - --- | Like 'throwSocketErrorIfMinus1Retry', but if the action fails with --- @EWOULDBLOCK@ or similar, wait for the socket to be read-ready, --- and try again. -throwSocketErrorWaitRead :: (Eq a, Num a) => Socket -> String -> IO a -> IO a -throwSocketErrorWaitRead sock name io = - throwSocketErrorIfMinus1RetryMayBlock name - (threadWaitRead $ fromIntegral $ fdSocket sock) - io - --- | Like 'throwSocketErrorIfMinus1Retry', but if the action fails with --- @EWOULDBLOCK@ or similar, wait for the socket to be write-ready, --- and try again. -throwSocketErrorWaitWrite :: (Eq a, Num a) => Socket -> String -> IO a -> IO a -throwSocketErrorWaitWrite sock name io = - throwSocketErrorIfMinus1RetryMayBlock name - (threadWaitWrite $ fromIntegral $ fdSocket sock) - io - --- --------------------------------------------------------------------------- --- WinSock support - -{-| With older versions of the @network@ library (version 2.6.0.2 or earlier) -on Windows operating systems, -the networking subsystem must be initialised using 'withSocketsDo' before -any networking operations can be used. eg. - -> main = withSocketsDo $ do {...} - -It is fine to nest calls to 'withSocketsDo', and to perform networking operations -after 'withSocketsDo' has returned. - -In newer versions of the @network@ library (version v2.6.1.0 or later) -it is only necessary to call -'withSocketsDo' if you are calling the 'MkSocket' constructor directly. -However, for compatibility with older versions on Windows, it is good practice -to always call 'withSocketsDo' (it's very cheap). --} -{-# INLINE withSocketsDo #-} -withSocketsDo :: IO a -> IO a -#if !defined(WITH_WINSOCK) -withSocketsDo x = x -#else -withSocketsDo act = evaluate withSocketsInit >> act - - -{-# NOINLINE withSocketsInit #-} -withSocketsInit :: () --- Use a CAF to make forcing it do initialisation once, but subsequent forces will be cheap -withSocketsInit = unsafePerformIO $ do - x <- initWinSock - when (x /= 0) $ ioError $ - userError "Network.Socket.Internal.withSocketsDo: Failed to initialise WinSock" - -foreign import ccall unsafe "initWinSock" initWinSock :: IO Int - -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/Types.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/Types.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket/Types.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket/Types.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,1135 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE ForeignFunctionInterface #-} - -#include "HsNet.h" -##include "HsNetDef.h" - -module Network.Socket.Types - ( - -- * Socket - Socket(..) - , fdSocket - , sockFamily - , sockType - , sockProtocol - , sockStatus - , SocketStatus(..) - - -- * Socket types - , SocketType(..) - , isSupportedSocketType - , packSocketType - , packSocketType' - , packSocketTypeOrThrow - , unpackSocketType - , unpackSocketType' - - -- * Family - , Family(..) - , isSupportedFamily - , packFamily - , unpackFamily - - -- * Socket addresses - , SockAddr(..) - , isSupportedSockAddr - , HostAddress - , hostAddressToTuple - , tupleToHostAddress -#if defined(IPV6_SOCKET_SUPPORT) - , HostAddress6 - , hostAddress6ToTuple - , tupleToHostAddress6 - , FlowInfo - , ScopeID -#endif - , peekSockAddr - , pokeSockAddr - , sizeOfSockAddr - , sizeOfSockAddrByFamily - , withSockAddr - , withNewSockAddr - - -- * Unsorted - , ProtocolNumber - , PortNumber(..) - - -- * Low-level helpers - , zeroMemory - ) where - -import Control.Concurrent.MVar -import Control.Monad -import Data.Bits -import Data.Maybe -import Data.Ratio -import Data.Typeable -import Data.Word -import Data.Int -import Foreign.C -import Foreign.Marshal.Alloc -import Foreign.Marshal.Array -import Foreign.Ptr -import Foreign.Storable - --- | A socket data type. --- 'Socket's are not GCed unless they are closed by 'close'. -data Socket - = MkSocket - CInt -- File Descriptor - Family - SocketType - ProtocolNumber -- Protocol Number - (MVar SocketStatus) -- Status Flag - deriving Typeable - -{-# DEPRECATED MkSocket "'MkSocket' will not be available in version 3.0.0.0 or later. Use fdSocket instead" #-} - --- | Obtaining the file descriptor from a socket. --- --- If a 'Socket' is shared with multiple threads and --- one uses 'fdSocket', unexpected issues may happen. --- Consider the following scenario: --- --- 1) Thread A acquires a 'Fd' from 'Socket' by 'fdSocket'. --- --- 2) Thread B close the 'Socket'. --- --- 3) Thread C opens a new 'Socket'. Unfortunately it gets the same 'Fd' --- number which thread A is holding. --- --- In this case, it is safer for Thread A to clone 'Fd' by --- 'System.Posix.IO.dup'. But this would still suffer from --- a rase condition between 'fdSocket' and 'close'. -fdSocket :: Socket -> CInt -fdSocket (MkSocket fd _ _ _ _) = fd - -sockFamily :: Socket -> Family -sockFamily (MkSocket _ f _ _ _) = f - -sockType :: Socket -> SocketType -sockType (MkSocket _ _ t _ _) = t - -sockProtocol :: Socket -> ProtocolNumber -sockProtocol (MkSocket _ _ _ p _) = p - -sockStatus :: Socket -> MVar SocketStatus -sockStatus (MkSocket _ _ _ _ s) = s - -instance Eq Socket where - (MkSocket _ _ _ _ m1) == (MkSocket _ _ _ _ m2) = m1 == m2 - -instance Show Socket where - showsPrec _n (MkSocket fd _ _ _ _) = - showString "" - -type ProtocolNumber = CInt - --- | The status of the socket as /determined by this library/, not --- necessarily reflecting the state of the connection itself. --- --- For example, the 'Closed' status is applied when the 'close' --- function is called. -data SocketStatus - -- Returned Status Function called - = NotConnected -- ^ Newly created, unconnected socket - | Bound -- ^ Bound, via 'bind' - | Listening -- ^ Listening, via 'listen' - | Connected -- ^ Connected or accepted, via 'connect' or 'accept' - | ConvertedToHandle -- ^ Is now a 'Handle' (via 'socketToHandle'), don't touch - | Closed -- ^ Closed was closed by 'close' - deriving (Eq, Show, Typeable) - -{-# DEPRECATED SocketStatus "SocketStatus will be removed" #-} - ------------------------------------------------------------------------------ --- Socket types - --- There are a few possible ways to do this. The first is convert the --- structs used in the C library into an equivalent Haskell type. An --- other possible implementation is to keep all the internals in the C --- code and use an Int## and a status flag. The second method is used --- here since a lot of the C structures are not required to be --- manipulated. - --- Originally the status was non-mutable so we had to return a new --- socket each time we changed the status. This version now uses --- mutable variables to avoid the need to do this. The result is a --- cleaner interface and better security since the application --- programmer now can't circumvent the status information to perform --- invalid operations on sockets. - --- | Socket Types. --- --- The existence of a constructor does not necessarily imply that that --- socket type is supported on your system: see 'isSupportedSocketType'. -data SocketType - = NoSocketType -- ^ 0, used in getAddrInfo hints, for example - | Stream -- ^ SOCK_STREAM - | Datagram -- ^ SOCK_DGRAM - | Raw -- ^ SOCK_RAW - | RDM -- ^ SOCK_RDM - | SeqPacket -- ^ SOCK_SEQPACKET - deriving (Eq, Ord, Read, Show, Typeable) - --- | Does the SOCK_ constant corresponding to the given SocketType exist on --- this system? -isSupportedSocketType :: SocketType -> Bool -isSupportedSocketType = isJust . packSocketType' - --- | Find the SOCK_ constant corresponding to the SocketType value. -packSocketType' :: SocketType -> Maybe CInt -packSocketType' stype = case Just stype of - -- the Just above is to disable GHC's overlapping pattern - -- detection: see comments for packSocketOption - Just NoSocketType -> Just 0 -#ifdef SOCK_STREAM - Just Stream -> Just #const SOCK_STREAM -#endif -#ifdef SOCK_DGRAM - Just Datagram -> Just #const SOCK_DGRAM -#endif -#ifdef SOCK_RAW - Just Raw -> Just #const SOCK_RAW -#endif -#ifdef SOCK_RDM - Just RDM -> Just #const SOCK_RDM -#endif -#ifdef SOCK_SEQPACKET - Just SeqPacket -> Just #const SOCK_SEQPACKET -#endif - _ -> Nothing - -{-# DEPRECATED packSocketType "packSocketType will not be available in version 3.0.0.0 or later." #-} - -packSocketType :: SocketType -> CInt -packSocketType stype = fromMaybe (error errMsg) (packSocketType' stype) - where - errMsg = concat ["Network.Socket.packSocketType: ", - "socket type ", show stype, " unsupported on this system"] - --- | Try packSocketType' on the SocketType, if it fails throw an error with --- message starting "Network.Socket." ++ the String parameter -packSocketTypeOrThrow :: String -> SocketType -> IO CInt -packSocketTypeOrThrow caller stype = maybe err return (packSocketType' stype) - where - err = ioError . userError . concat $ ["Network.Socket.", caller, ": ", - "socket type ", show stype, " unsupported on this system"] - - -unpackSocketType:: CInt -> Maybe SocketType -unpackSocketType t = case t of - 0 -> Just NoSocketType -#ifdef SOCK_STREAM - (#const SOCK_STREAM) -> Just Stream -#endif -#ifdef SOCK_DGRAM - (#const SOCK_DGRAM) -> Just Datagram -#endif -#ifdef SOCK_RAW - (#const SOCK_RAW) -> Just Raw -#endif -#ifdef SOCK_RDM - (#const SOCK_RDM) -> Just RDM -#endif -#ifdef SOCK_SEQPACKET - (#const SOCK_SEQPACKET) -> Just SeqPacket -#endif - _ -> Nothing - --- | Try unpackSocketType on the CInt, if it fails throw an error with --- message starting "Network.Socket." ++ the String parameter -unpackSocketType' :: String -> CInt -> IO SocketType -unpackSocketType' caller ty = maybe err return (unpackSocketType ty) - where - err = ioError . userError . concat $ ["Network.Socket.", caller, ": ", - "socket type ", show ty, " unsupported on this system"] - ------------------------------------------------------------------------- --- Protocol Families. - --- | Address families. --- --- A constructor being present here does not mean it is supported by the --- operating system: see 'isSupportedFamily'. -data Family - = AF_UNSPEC -- unspecified - | AF_UNIX -- local to host (pipes, portals - | AF_INET -- internetwork: UDP, TCP, etc - | AF_INET6 -- Internet Protocol version 6 - | AF_IMPLINK -- arpanet imp addresses - | AF_PUP -- pup protocols: e.g. BSP - | AF_CHAOS -- mit CHAOS protocols - | AF_NS -- XEROX NS protocols - | AF_NBS -- nbs protocols - | AF_ECMA -- european computer manufacturers - | AF_DATAKIT -- datakit protocols - | AF_CCITT -- CCITT protocols, X.25 etc - | AF_SNA -- IBM SNA - | AF_DECnet -- DECnet - | AF_DLI -- Direct data link interface - | AF_LAT -- LAT - | AF_HYLINK -- NSC Hyperchannel - | AF_APPLETALK -- Apple Talk - | AF_ROUTE -- Internal Routing Protocol (aka AF_NETLINK) - | AF_NETBIOS -- NetBios-style addresses - | AF_NIT -- Network Interface Tap - | AF_802 -- IEEE 802.2, also ISO 8802 - | AF_ISO -- ISO protocols - | AF_OSI -- umbrella of all families used by OSI - | AF_NETMAN -- DNA Network Management - | AF_X25 -- CCITT X.25 - | AF_AX25 - | AF_OSINET -- AFI - | AF_GOSSIP -- US Government OSI - | AF_IPX -- Novell Internet Protocol - | Pseudo_AF_XTP -- eXpress Transfer Protocol (no AF) - | AF_CTF -- Common Trace Facility - | AF_WAN -- Wide Area Network protocols - | AF_SDL -- SGI Data Link for DLPI - | AF_NETWARE - | AF_NDD - | AF_INTF -- Debugging use only - | AF_COIP -- connection-oriented IP, aka ST II - | AF_CNT -- Computer Network Technology - | Pseudo_AF_RTIP -- Help Identify RTIP packets - | Pseudo_AF_PIP -- Help Identify PIP packets - | AF_SIP -- Simple Internet Protocol - | AF_ISDN -- Integrated Services Digital Network - | Pseudo_AF_KEY -- Internal key-management function - | AF_NATM -- native ATM access - | AF_ARP -- (rev.) addr. res. prot. (RFC 826) - | Pseudo_AF_HDRCMPLT -- Used by BPF to not rewrite hdrs in iface output - | AF_ENCAP - | AF_LINK -- Link layer interface - | AF_RAW -- Link layer interface - | AF_RIF -- raw interface - | AF_NETROM -- Amateur radio NetROM - | AF_BRIDGE -- multiprotocol bridge - | AF_ATMPVC -- ATM PVCs - | AF_ROSE -- Amateur Radio X.25 PLP - | AF_NETBEUI -- 802.2LLC - | AF_SECURITY -- Security callback pseudo AF - | AF_PACKET -- Packet family - | AF_ASH -- Ash - | AF_ECONET -- Acorn Econet - | AF_ATMSVC -- ATM SVCs - | AF_IRDA -- IRDA sockets - | AF_PPPOX -- PPPoX sockets - | AF_WANPIPE -- Wanpipe API sockets - | AF_BLUETOOTH -- bluetooth sockets - | AF_CAN -- Controller Area Network - deriving (Eq, Ord, Read, Show) - -packFamily :: Family -> CInt -packFamily f = case packFamily' f of - Just fam -> fam - Nothing -> error $ - "Network.Socket.packFamily: unsupported address family: " ++ - show f - --- | Does the AF_ constant corresponding to the given family exist on this --- system? -isSupportedFamily :: Family -> Bool -isSupportedFamily = isJust . packFamily' - -packFamily' :: Family -> Maybe CInt -packFamily' f = case Just f of - -- the Just above is to disable GHC's overlapping pattern - -- detection: see comments for packSocketOption - Just AF_UNSPEC -> Just #const AF_UNSPEC -#ifdef AF_UNIX - Just AF_UNIX -> Just #const AF_UNIX -#endif -#ifdef AF_INET - Just AF_INET -> Just #const AF_INET -#endif -#ifdef AF_INET6 - Just AF_INET6 -> Just #const AF_INET6 -#endif -#ifdef AF_IMPLINK - Just AF_IMPLINK -> Just #const AF_IMPLINK -#endif -#ifdef AF_PUP - Just AF_PUP -> Just #const AF_PUP -#endif -#ifdef AF_CHAOS - Just AF_CHAOS -> Just #const AF_CHAOS -#endif -#ifdef AF_NS - Just AF_NS -> Just #const AF_NS -#endif -#ifdef AF_NBS - Just AF_NBS -> Just #const AF_NBS -#endif -#ifdef AF_ECMA - Just AF_ECMA -> Just #const AF_ECMA -#endif -#ifdef AF_DATAKIT - Just AF_DATAKIT -> Just #const AF_DATAKIT -#endif -#ifdef AF_CCITT - Just AF_CCITT -> Just #const AF_CCITT -#endif -#ifdef AF_SNA - Just AF_SNA -> Just #const AF_SNA -#endif -#ifdef AF_DECnet - Just AF_DECnet -> Just #const AF_DECnet -#endif -#ifdef AF_DLI - Just AF_DLI -> Just #const AF_DLI -#endif -#ifdef AF_LAT - Just AF_LAT -> Just #const AF_LAT -#endif -#ifdef AF_HYLINK - Just AF_HYLINK -> Just #const AF_HYLINK -#endif -#ifdef AF_APPLETALK - Just AF_APPLETALK -> Just #const AF_APPLETALK -#endif -#ifdef AF_ROUTE - Just AF_ROUTE -> Just #const AF_ROUTE -#endif -#ifdef AF_NETBIOS - Just AF_NETBIOS -> Just #const AF_NETBIOS -#endif -#ifdef AF_NIT - Just AF_NIT -> Just #const AF_NIT -#endif -#ifdef AF_802 - Just AF_802 -> Just #const AF_802 -#endif -#ifdef AF_ISO - Just AF_ISO -> Just #const AF_ISO -#endif -#ifdef AF_OSI - Just AF_OSI -> Just #const AF_OSI -#endif -#ifdef AF_NETMAN - Just AF_NETMAN -> Just #const AF_NETMAN -#endif -#ifdef AF_X25 - Just AF_X25 -> Just #const AF_X25 -#endif -#ifdef AF_AX25 - Just AF_AX25 -> Just #const AF_AX25 -#endif -#ifdef AF_OSINET - Just AF_OSINET -> Just #const AF_OSINET -#endif -#ifdef AF_GOSSIP - Just AF_GOSSIP -> Just #const AF_GOSSIP -#endif -#ifdef AF_IPX - Just AF_IPX -> Just #const AF_IPX -#endif -#ifdef Pseudo_AF_XTP - Just Pseudo_AF_XTP -> Just #const Pseudo_AF_XTP -#endif -#ifdef AF_CTF - Just AF_CTF -> Just #const AF_CTF -#endif -#ifdef AF_WAN - Just AF_WAN -> Just #const AF_WAN -#endif -#ifdef AF_SDL - Just AF_SDL -> Just #const AF_SDL -#endif -#ifdef AF_NETWARE - Just AF_NETWARE -> Just #const AF_NETWARE -#endif -#ifdef AF_NDD - Just AF_NDD -> Just #const AF_NDD -#endif -#ifdef AF_INTF - Just AF_INTF -> Just #const AF_INTF -#endif -#ifdef AF_COIP - Just AF_COIP -> Just #const AF_COIP -#endif -#ifdef AF_CNT - Just AF_CNT -> Just #const AF_CNT -#endif -#ifdef Pseudo_AF_RTIP - Just Pseudo_AF_RTIP -> Just #const Pseudo_AF_RTIP -#endif -#ifdef Pseudo_AF_PIP - Just Pseudo_AF_PIP -> Just #const Pseudo_AF_PIP -#endif -#ifdef AF_SIP - Just AF_SIP -> Just #const AF_SIP -#endif -#ifdef AF_ISDN - Just AF_ISDN -> Just #const AF_ISDN -#endif -#ifdef Pseudo_AF_KEY - Just Pseudo_AF_KEY -> Just #const Pseudo_AF_KEY -#endif -#ifdef AF_NATM - Just AF_NATM -> Just #const AF_NATM -#endif -#ifdef AF_ARP - Just AF_ARP -> Just #const AF_ARP -#endif -#ifdef Pseudo_AF_HDRCMPLT - Just Pseudo_AF_HDRCMPLT -> Just #const Pseudo_AF_HDRCMPLT -#endif -#ifdef AF_ENCAP - Just AF_ENCAP -> Just #const AF_ENCAP -#endif -#ifdef AF_LINK - Just AF_LINK -> Just #const AF_LINK -#endif -#ifdef AF_RAW - Just AF_RAW -> Just #const AF_RAW -#endif -#ifdef AF_RIF - Just AF_RIF -> Just #const AF_RIF -#endif -#ifdef AF_NETROM - Just AF_NETROM -> Just #const AF_NETROM -#endif -#ifdef AF_BRIDGE - Just AF_BRIDGE -> Just #const AF_BRIDGE -#endif -#ifdef AF_ATMPVC - Just AF_ATMPVC -> Just #const AF_ATMPVC -#endif -#ifdef AF_ROSE - Just AF_ROSE -> Just #const AF_ROSE -#endif -#ifdef AF_NETBEUI - Just AF_NETBEUI -> Just #const AF_NETBEUI -#endif -#ifdef AF_SECURITY - Just AF_SECURITY -> Just #const AF_SECURITY -#endif -#ifdef AF_PACKET - Just AF_PACKET -> Just #const AF_PACKET -#endif -#ifdef AF_ASH - Just AF_ASH -> Just #const AF_ASH -#endif -#ifdef AF_ECONET - Just AF_ECONET -> Just #const AF_ECONET -#endif -#ifdef AF_ATMSVC - Just AF_ATMSVC -> Just #const AF_ATMSVC -#endif -#ifdef AF_IRDA - Just AF_IRDA -> Just #const AF_IRDA -#endif -#ifdef AF_PPPOX - Just AF_PPPOX -> Just #const AF_PPPOX -#endif -#ifdef AF_WANPIPE - Just AF_WANPIPE -> Just #const AF_WANPIPE -#endif -#ifdef AF_BLUETOOTH - Just AF_BLUETOOTH -> Just #const AF_BLUETOOTH -#endif -#ifdef AF_CAN - Just AF_CAN -> Just #const AF_CAN -#endif - _ -> Nothing - ---------- ---------- - -unpackFamily :: CInt -> Family -unpackFamily f = case f of - (#const AF_UNSPEC) -> AF_UNSPEC -#ifdef AF_UNIX - (#const AF_UNIX) -> AF_UNIX -#endif -#ifdef AF_INET - (#const AF_INET) -> AF_INET -#endif -#ifdef AF_INET6 - (#const AF_INET6) -> AF_INET6 -#endif -#ifdef AF_IMPLINK - (#const AF_IMPLINK) -> AF_IMPLINK -#endif -#ifdef AF_PUP - (#const AF_PUP) -> AF_PUP -#endif -#ifdef AF_CHAOS - (#const AF_CHAOS) -> AF_CHAOS -#endif -#ifdef AF_NS - (#const AF_NS) -> AF_NS -#endif -#ifdef AF_NBS - (#const AF_NBS) -> AF_NBS -#endif -#ifdef AF_ECMA - (#const AF_ECMA) -> AF_ECMA -#endif -#ifdef AF_DATAKIT - (#const AF_DATAKIT) -> AF_DATAKIT -#endif -#ifdef AF_CCITT - (#const AF_CCITT) -> AF_CCITT -#endif -#ifdef AF_SNA - (#const AF_SNA) -> AF_SNA -#endif -#ifdef AF_DECnet - (#const AF_DECnet) -> AF_DECnet -#endif -#ifdef AF_DLI - (#const AF_DLI) -> AF_DLI -#endif -#ifdef AF_LAT - (#const AF_LAT) -> AF_LAT -#endif -#ifdef AF_HYLINK - (#const AF_HYLINK) -> AF_HYLINK -#endif -#ifdef AF_APPLETALK - (#const AF_APPLETALK) -> AF_APPLETALK -#endif -#ifdef AF_ROUTE - (#const AF_ROUTE) -> AF_ROUTE -#endif -#ifdef AF_NETBIOS - (#const AF_NETBIOS) -> AF_NETBIOS -#endif -#ifdef AF_NIT - (#const AF_NIT) -> AF_NIT -#endif -#ifdef AF_802 - (#const AF_802) -> AF_802 -#endif -#ifdef AF_ISO - (#const AF_ISO) -> AF_ISO -#endif -#ifdef AF_OSI -# if (!defined(AF_ISO)) || (defined(AF_ISO) && (AF_ISO != AF_OSI)) - (#const AF_OSI) -> AF_OSI -# endif -#endif -#ifdef AF_NETMAN - (#const AF_NETMAN) -> AF_NETMAN -#endif -#ifdef AF_X25 - (#const AF_X25) -> AF_X25 -#endif -#ifdef AF_AX25 - (#const AF_AX25) -> AF_AX25 -#endif -#ifdef AF_OSINET - (#const AF_OSINET) -> AF_OSINET -#endif -#ifdef AF_GOSSIP - (#const AF_GOSSIP) -> AF_GOSSIP -#endif -#if defined(AF_IPX) && (!defined(AF_NS) || AF_NS != AF_IPX) - (#const AF_IPX) -> AF_IPX -#endif -#ifdef Pseudo_AF_XTP - (#const Pseudo_AF_XTP) -> Pseudo_AF_XTP -#endif -#ifdef AF_CTF - (#const AF_CTF) -> AF_CTF -#endif -#ifdef AF_WAN - (#const AF_WAN) -> AF_WAN -#endif -#ifdef AF_SDL - (#const AF_SDL) -> AF_SDL -#endif -#ifdef AF_NETWARE - (#const AF_NETWARE) -> AF_NETWARE -#endif -#ifdef AF_NDD - (#const AF_NDD) -> AF_NDD -#endif -#ifdef AF_INTF - (#const AF_INTF) -> AF_INTF -#endif -#ifdef AF_COIP - (#const AF_COIP) -> AF_COIP -#endif -#ifdef AF_CNT - (#const AF_CNT) -> AF_CNT -#endif -#ifdef Pseudo_AF_RTIP - (#const Pseudo_AF_RTIP) -> Pseudo_AF_RTIP -#endif -#ifdef Pseudo_AF_PIP - (#const Pseudo_AF_PIP) -> Pseudo_AF_PIP -#endif -#ifdef AF_SIP - (#const AF_SIP) -> AF_SIP -#endif -#ifdef AF_ISDN - (#const AF_ISDN) -> AF_ISDN -#endif -#ifdef Pseudo_AF_KEY - (#const Pseudo_AF_KEY) -> Pseudo_AF_KEY -#endif -#ifdef AF_NATM - (#const AF_NATM) -> AF_NATM -#endif -#ifdef AF_ARP - (#const AF_ARP) -> AF_ARP -#endif -#ifdef Pseudo_AF_HDRCMPLT - (#const Pseudo_AF_HDRCMPLT) -> Pseudo_AF_HDRCMPLT -#endif -#ifdef AF_ENCAP - (#const AF_ENCAP) -> AF_ENCAP -#endif -#ifdef AF_LINK - (#const AF_LINK) -> AF_LINK -#endif -#ifdef AF_RAW - (#const AF_RAW) -> AF_RAW -#endif -#ifdef AF_RIF - (#const AF_RIF) -> AF_RIF -#endif -#ifdef AF_NETROM - (#const AF_NETROM) -> AF_NETROM -#endif -#ifdef AF_BRIDGE - (#const AF_BRIDGE) -> AF_BRIDGE -#endif -#ifdef AF_ATMPVC - (#const AF_ATMPVC) -> AF_ATMPVC -#endif -#ifdef AF_ROSE - (#const AF_ROSE) -> AF_ROSE -#endif -#ifdef AF_NETBEUI - (#const AF_NETBEUI) -> AF_NETBEUI -#endif -#ifdef AF_SECURITY - (#const AF_SECURITY) -> AF_SECURITY -#endif -#ifdef AF_PACKET - (#const AF_PACKET) -> AF_PACKET -#endif -#ifdef AF_ASH - (#const AF_ASH) -> AF_ASH -#endif -#ifdef AF_ECONET - (#const AF_ECONET) -> AF_ECONET -#endif -#ifdef AF_ATMSVC - (#const AF_ATMSVC) -> AF_ATMSVC -#endif -#ifdef AF_IRDA - (#const AF_IRDA) -> AF_IRDA -#endif -#ifdef AF_PPPOX - (#const AF_PPPOX) -> AF_PPPOX -#endif -#ifdef AF_WANPIPE - (#const AF_WANPIPE) -> AF_WANPIPE -#endif -#ifdef AF_BLUETOOTH - (#const AF_BLUETOOTH) -> AF_BLUETOOTH -#endif -#ifdef AF_CAN - (#const AF_CAN) -> AF_CAN -#endif - unknown -> error $ - "Network.Socket.Types.unpackFamily: unknown address family: " ++ - show unknown - ------------------------------------------------------------------------- --- Port Numbers - --- | Use the @Num@ instance (i.e. use a literal) to create a --- @PortNumber@ value with the correct network-byte-ordering. You --- should not use the PortNum constructor. It will be removed in the --- next release. --- --- >>> 1 :: PortNumber --- 1 --- >>> read "1" :: PortNumber --- 1 -newtype PortNumber = PortNum Word16 deriving (Eq, Ord, Typeable) --- newtyped to prevent accidental use of sane-looking --- port numbers that haven't actually been converted to --- network-byte-order first. - -{-# DEPRECATED PortNum "Do not use the PortNum constructor. Use the Num instance. PortNum will be removed in the next release." #-} - -instance Show PortNumber where - showsPrec p pn = showsPrec p (portNumberToInt pn) - -instance Read PortNumber where - readsPrec n = map (\(x,y) -> (intToPortNumber x, y)) . readsPrec n - -intToPortNumber :: Int -> PortNumber -intToPortNumber v = PortNum (htons (fromIntegral v)) - -portNumberToInt :: PortNumber -> Int -portNumberToInt (PortNum po) = fromIntegral (ntohs po) - -foreign import CALLCONV unsafe "ntohs" ntohs :: Word16 -> Word16 -foreign import CALLCONV unsafe "htons" htons :: Word16 -> Word16 -foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32 -foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32 - -instance Enum PortNumber where - toEnum = intToPortNumber - fromEnum = portNumberToInt - -instance Num PortNumber where - fromInteger i = intToPortNumber (fromInteger i) - -- for completeness. - (+) x y = intToPortNumber (portNumberToInt x + portNumberToInt y) - (-) x y = intToPortNumber (portNumberToInt x - portNumberToInt y) - negate x = intToPortNumber (-portNumberToInt x) - (*) x y = intToPortNumber (portNumberToInt x * portNumberToInt y) - abs n = intToPortNumber (abs (portNumberToInt n)) - signum n = intToPortNumber (signum (portNumberToInt n)) - -instance Real PortNumber where - toRational x = toInteger x % 1 - -instance Integral PortNumber where - quotRem a b = let (c,d) = quotRem (portNumberToInt a) (portNumberToInt b) in - (intToPortNumber c, intToPortNumber d) - toInteger a = toInteger (portNumberToInt a) - -instance Storable PortNumber where - sizeOf _ = sizeOf (undefined :: Word16) - alignment _ = alignment (undefined :: Word16) - poke p (PortNum po) = poke (castPtr p) po - peek p = PortNum `liftM` peek (castPtr p) - ------------------------------------------------------------------------- --- Socket addresses - --- The scheme used for addressing sockets is somewhat quirky. The --- calls in the BSD socket API that need to know the socket address --- all operate in terms of struct sockaddr, a `virtual' type of --- socket address. - --- The Internet family of sockets are addressed as struct sockaddr_in, --- so when calling functions that operate on struct sockaddr, we have --- to type cast the Internet socket address into a struct sockaddr. --- Instances of the structure for different families might *not* be --- the same size. Same casting is required of other families of --- sockets such as Xerox NS. Similarly for UNIX-domain sockets. - --- To represent these socket addresses in Haskell-land, we do what BSD --- didn't do, and use a union/algebraic type for the different --- families. Currently only UNIX-domain sockets and the Internet --- families are supported. - -#if defined(IPV6_SOCKET_SUPPORT) -type FlowInfo = Word32 -type ScopeID = Word32 -#endif - --- | The existence of a constructor does not necessarily imply that --- that socket address type is supported on your system: see --- 'isSupportedSockAddr'. -data SockAddr -- C Names - = SockAddrInet - PortNumber -- sin_port (network byte order) - HostAddress -- sin_addr (ditto) - | SockAddrInet6 - PortNumber -- sin6_port (network byte order) - FlowInfo -- sin6_flowinfo (ditto) - HostAddress6 -- sin6_addr (ditto) - ScopeID -- sin6_scope_id (ditto) - | SockAddrUnix - String -- sun_path - | SockAddrCan - Int32 -- can_ifindex (can be get by Network.BSD.ifNameToIndex "can0") - -- TODO: Extend this to include transport protocol information - deriving (Eq, Ord, Typeable) - --- | Is the socket address type supported on this system? -isSupportedSockAddr :: SockAddr -> Bool -isSupportedSockAddr addr = case addr of - SockAddrInet {} -> True -#if defined(IPV6_SOCKET_SUPPORT) - SockAddrInet6 {} -> True -#endif -#if defined(DOMAIN_SOCKET_SUPPORT) - SockAddrUnix{} -> True -#endif -#if defined(CAN_SOCKET_SUPPORT) - SockAddrCan{} -> True -#endif -#if !(defined(IPV6_SOCKET_SUPPORT) \ - && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) - _ -> False -#endif - -{-# DEPRECATED SockAddrCan "This will be removed in 3.0" #-} - -#if defined(WITH_WINSOCK) -type CSaFamily = (#type unsigned short) -#elif defined(darwin_HOST_OS) -type CSaFamily = (#type u_char) -#else -type CSaFamily = (#type sa_family_t) -#endif - --- | Computes the storage requirements (in bytes) of the given --- 'SockAddr'. This function differs from 'Foreign.Storable.sizeOf' --- in that the value of the argument /is/ used. -sizeOfSockAddr :: SockAddr -> Int -#if defined(DOMAIN_SOCKET_SUPPORT) -sizeOfSockAddr (SockAddrUnix path) = - case path of - '\0':_ -> (#const sizeof(sa_family_t)) + length path - _ -> #const sizeof(struct sockaddr_un) -#endif -sizeOfSockAddr (SockAddrInet _ _) = #const sizeof(struct sockaddr_in) -#if defined(IPV6_SOCKET_SUPPORT) -sizeOfSockAddr (SockAddrInet6 _ _ _ _) = #const sizeof(struct sockaddr_in6) -#endif -#if defined(CAN_SOCKET_SUPPORT) -sizeOfSockAddr (SockAddrCan _) = #const sizeof(struct sockaddr_can) -#endif -#if !(defined(IPV6_SOCKET_SUPPORT) \ - && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) -sizeOfSockAddr _ = error "sizeOfSockAddr: not supported" -#endif - --- | Computes the storage requirements (in bytes) required for a --- 'SockAddr' with the given 'Family'. -sizeOfSockAddrByFamily :: Family -> Int -#if defined(DOMAIN_SOCKET_SUPPORT) -sizeOfSockAddrByFamily AF_UNIX = #const sizeof(struct sockaddr_un) -#endif -#if defined(IPV6_SOCKET_SUPPORT) -sizeOfSockAddrByFamily AF_INET6 = #const sizeof(struct sockaddr_in6) -#endif -sizeOfSockAddrByFamily AF_INET = #const sizeof(struct sockaddr_in) -#if defined(CAN_SOCKET_SUPPORT) -sizeOfSockAddrByFamily AF_CAN = #const sizeof(struct sockaddr_can) -#endif -sizeOfSockAddrByFamily family = error $ - "Network.Socket.Types.sizeOfSockAddrByFamily: address family '" ++ - show family ++ "' not supported." - --- | Use a 'SockAddr' with a function requiring a pointer to a --- 'SockAddr' and the length of that 'SockAddr'. -withSockAddr :: SockAddr -> (Ptr SockAddr -> Int -> IO a) -> IO a -withSockAddr addr f = do - let sz = sizeOfSockAddr addr - allocaBytes sz $ \p -> pokeSockAddr p addr >> f (castPtr p) sz - --- | Create a new 'SockAddr' for use with a function requiring a --- pointer to a 'SockAddr' and the length of that 'SockAddr'. -withNewSockAddr :: Family -> (Ptr SockAddr -> Int -> IO a) -> IO a -withNewSockAddr family f = do - let sz = sizeOfSockAddrByFamily family - allocaBytes sz $ \ptr -> f ptr sz - --- We can't write an instance of 'Storable' for 'SockAddr' because --- @sockaddr@ is a sum type of variable size but --- 'Foreign.Storable.sizeOf' is required to be constant. - --- Note that on Darwin, the sockaddr structure must be zeroed before --- use. - --- | Write the given 'SockAddr' to the given memory location. -pokeSockAddr :: Ptr a -> SockAddr -> IO () -#if defined(DOMAIN_SOCKET_SUPPORT) -pokeSockAddr p (SockAddrUnix path) = do -#if defined(darwin_HOST_OS) - zeroMemory p (#const sizeof(struct sockaddr_un)) -#else - case path of - ('\0':_) -> zeroMemory p (#const sizeof(struct sockaddr_un)) - _ -> return () -#endif -#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) - (#poke struct sockaddr_un, sun_len) p ((#const sizeof(struct sockaddr_un)) :: Word8) -#endif - (#poke struct sockaddr_un, sun_family) p ((#const AF_UNIX) :: CSaFamily) - let pathC = map castCharToCChar path - poker = case path of ('\0':_) -> pokeArray; _ -> pokeArray0 0 - poker ((#ptr struct sockaddr_un, sun_path) p) pathC -#endif -pokeSockAddr p (SockAddrInet (PortNum port) addr) = do -#if defined(darwin_HOST_OS) - zeroMemory p (#const sizeof(struct sockaddr_in)) -#endif -#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) - (#poke struct sockaddr_in, sin_len) p ((#const sizeof(struct sockaddr_in)) :: Word8) -#endif - (#poke struct sockaddr_in, sin_family) p ((#const AF_INET) :: CSaFamily) - (#poke struct sockaddr_in, sin_port) p port - (#poke struct sockaddr_in, sin_addr) p addr -#if defined(IPV6_SOCKET_SUPPORT) -pokeSockAddr p (SockAddrInet6 (PortNum port) flow addr scope) = do -#if defined(darwin_HOST_OS) - zeroMemory p (#const sizeof(struct sockaddr_in6)) -#endif -#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) - (#poke struct sockaddr_in6, sin6_len) p ((#const sizeof(struct sockaddr_in6)) :: Word8) -#endif - (#poke struct sockaddr_in6, sin6_family) p ((#const AF_INET6) :: CSaFamily) - (#poke struct sockaddr_in6, sin6_port) p port - (#poke struct sockaddr_in6, sin6_flowinfo) p flow - (#poke struct sockaddr_in6, sin6_addr) p (In6Addr addr) - (#poke struct sockaddr_in6, sin6_scope_id) p scope -#endif -#if defined(CAN_SOCKET_SUPPORT) -pokeSockAddr p (SockAddrCan ifIndex) = do -#if defined(darwin_HOST_OS) - zeroMemory p (#const sizeof(struct sockaddr_can)) -#endif - (#poke struct sockaddr_can, can_ifindex) p ifIndex -#endif -#if !(defined(IPV6_SOCKET_SUPPORT) \ - && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) -pokeSockAddr _ _ = error "pokeSockAddr: not supported" -#endif - --- | Read a 'SockAddr' from the given memory location. -peekSockAddr :: Ptr SockAddr -> IO SockAddr -peekSockAddr p = do - family <- (#peek struct sockaddr, sa_family) p - case family :: CSaFamily of -#if defined(DOMAIN_SOCKET_SUPPORT) - (#const AF_UNIX) -> do - str <- peekCString ((#ptr struct sockaddr_un, sun_path) p) - return (SockAddrUnix str) -#endif - (#const AF_INET) -> do - addr <- (#peek struct sockaddr_in, sin_addr) p - port <- (#peek struct sockaddr_in, sin_port) p - return (SockAddrInet (PortNum port) addr) -#if defined(IPV6_SOCKET_SUPPORT) - (#const AF_INET6) -> do - port <- (#peek struct sockaddr_in6, sin6_port) p - flow <- (#peek struct sockaddr_in6, sin6_flowinfo) p - In6Addr addr <- (#peek struct sockaddr_in6, sin6_addr) p - scope <- (#peek struct sockaddr_in6, sin6_scope_id) p - return (SockAddrInet6 (PortNum port) flow addr scope) -#endif -#if defined(CAN_SOCKET_SUPPORT) - (#const AF_CAN) -> do - ifidx <- (#peek struct sockaddr_can, can_ifindex) p - return (SockAddrCan ifidx) -#endif - _ -> ioError $ userError $ - "Network.Socket.Types.peekSockAddr: address family '" ++ - show family ++ "' not supported." - ------------------------------------------------------------------------- - --- | The raw network byte order number is read using host byte order. --- Therefore on little-endian architectures the byte order is swapped. For --- example @127.0.0.1@ is represented as @0x0100007f@ on little-endian hosts --- and as @0x7f000001@ on big-endian hosts. --- --- For direct manipulation prefer 'hostAddressToTuple' and --- 'tupleToHostAddress'. -type HostAddress = Word32 - --- | Converts 'HostAddress' to representation-independent IPv4 quadruple. --- For example for @127.0.0.1@ the function will return @(0x7f, 0, 0, 1)@ --- regardless of host endianness. -hostAddressToTuple :: HostAddress -> (Word8, Word8, Word8, Word8) -hostAddressToTuple ha' = - let ha = htonl ha' - byte i = fromIntegral (ha `shiftR` i) :: Word8 - in (byte 24, byte 16, byte 8, byte 0) - --- | Converts IPv4 quadruple to 'HostAddress'. -tupleToHostAddress :: (Word8, Word8, Word8, Word8) -> HostAddress -tupleToHostAddress (b3, b2, b1, b0) = - let x `sl` i = fromIntegral x `shiftL` i :: Word32 - in ntohl $ (b3 `sl` 24) .|. (b2 `sl` 16) .|. (b1 `sl` 8) .|. (b0 `sl` 0) - -#if defined(IPV6_SOCKET_SUPPORT) --- | Independent of endianness. For example @::1@ is stored as @(0, 0, 0, 1)@. --- --- For direct manipulation prefer 'hostAddress6ToTuple' and --- 'tupleToHostAddress6'. -type HostAddress6 = (Word32, Word32, Word32, Word32) - -hostAddress6ToTuple :: HostAddress6 -> (Word16, Word16, Word16, Word16, - Word16, Word16, Word16, Word16) -hostAddress6ToTuple (w3, w2, w1, w0) = - let high, low :: Word32 -> Word16 - high w = fromIntegral (w `shiftR` 16) - low w = fromIntegral w - in (high w3, low w3, high w2, low w2, high w1, low w1, high w0, low w0) - -tupleToHostAddress6 :: (Word16, Word16, Word16, Word16, - Word16, Word16, Word16, Word16) -> HostAddress6 -tupleToHostAddress6 (w7, w6, w5, w4, w3, w2, w1, w0) = - let add :: Word16 -> Word16 -> Word32 - high `add` low = (fromIntegral high `shiftL` 16) .|. (fromIntegral low) - in (w7 `add` w6, w5 `add` w4, w3 `add` w2, w1 `add` w0) - --- The peek32 and poke32 functions work around the fact that the RFCs --- don't require 32-bit-wide address fields to be present. We can --- only portably rely on an 8-bit field, s6_addr. - -s6_addr_offset :: Int -s6_addr_offset = (#offset struct in6_addr, s6_addr) - -peek32 :: Ptr a -> Int -> IO Word32 -peek32 p i0 = do - let i' = i0 * 4 - peekByte n = peekByteOff p (s6_addr_offset + i' + n) :: IO Word8 - a `sl` i = fromIntegral a `shiftL` i - a0 <- peekByte 0 - a1 <- peekByte 1 - a2 <- peekByte 2 - a3 <- peekByte 3 - return ((a0 `sl` 24) .|. (a1 `sl` 16) .|. (a2 `sl` 8) .|. (a3 `sl` 0)) - -poke32 :: Ptr a -> Int -> Word32 -> IO () -poke32 p i0 a = do - let i' = i0 * 4 - pokeByte n = pokeByteOff p (s6_addr_offset + i' + n) - x `sr` i = fromIntegral (x `shiftR` i) :: Word8 - pokeByte 0 (a `sr` 24) - pokeByte 1 (a `sr` 16) - pokeByte 2 (a `sr` 8) - pokeByte 3 (a `sr` 0) - --- | Private newtype proxy for the Storable instance. To avoid orphan instances. -newtype In6Addr = In6Addr HostAddress6 - -#if __GLASGOW_HASKELL__ < 800 -#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__) -#endif - -instance Storable In6Addr where - sizeOf _ = #const sizeof(struct in6_addr) - alignment _ = #alignment struct in6_addr - - peek p = do - a <- peek32 p 0 - b <- peek32 p 1 - c <- peek32 p 2 - d <- peek32 p 3 - return $ In6Addr (a, b, c, d) - - poke p (In6Addr (a, b, c, d)) = do - poke32 p 0 a - poke32 p 1 b - poke32 p 2 c - poke32 p 3 d -#endif - ------------------------------------------------------------------------- --- Helper functions - -foreign import ccall unsafe "string.h" memset :: Ptr a -> CInt -> CSize -> IO () - --- | Zero a structure. -zeroMemory :: Ptr a -> CSize -> IO () -zeroMemory dest nbytes = memset dest 0 (fromIntegral nbytes) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network/Socket.hsc 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network/Socket.hsc 1970-01-01 00:00:00.000000000 +0000 @@ -1,1965 +0,0 @@ -{-# LANGUAGE CPP, ScopedTypeVariables, RecordWildCards #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} ------------------------------------------------------------------------------ --- | --- Module : Network.Socket --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/network/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- This is the main module of the network package supposed to be --- used with either "Network.Socket.ByteString" or --- "Network.Socket.ByteString.Lazy" for sending/receiving. --- --- Here are two minimal example programs using the TCP/IP protocol: a --- server that echoes all data that it receives back (servicing only --- one client) and a client using it. --- --- > -- Echo server program --- > module Main (main) where --- > --- > import Control.Concurrent (forkFinally) --- > import qualified Control.Exception as E --- > import Control.Monad (unless, forever, void) --- > import qualified Data.ByteString as S --- > import Network.Socket hiding (recv) --- > import Network.Socket.ByteString (recv, sendAll) --- > --- > main :: IO () --- > main = withSocketsDo $ do --- > addr <- resolve "3000" --- > E.bracket (open addr) close loop --- > where --- > resolve port = do --- > let hints = defaultHints { --- > addrFlags = [AI_PASSIVE] --- > , addrSocketType = Stream --- > } --- > addr:_ <- getAddrInfo (Just hints) Nothing (Just port) --- > return addr --- > open addr = do --- > sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) --- > setSocketOption sock ReuseAddr 1 --- > bind sock (addrAddress addr) --- > -- If the prefork technique is not used, --- > -- set CloseOnExec for the security reasons. --- > let fd = fdSocket sock --- > setCloseOnExecIfNeeded fd --- > listen sock 10 --- > return sock --- > loop sock = forever $ do --- > (conn, peer) <- accept sock --- > putStrLn $ "Connection from " ++ show peer --- > void $ forkFinally (talk conn) (\_ -> close conn) --- > talk conn = do --- > msg <- recv conn 1024 --- > unless (S.null msg) $ do --- > sendAll conn msg --- > talk conn --- --- > {-# LANGUAGE OverloadedStrings #-} --- > -- Echo client program --- > module Main (main) where --- > --- > import qualified Control.Exception as E --- > import qualified Data.ByteString.Char8 as C --- > import Network.Socket hiding (recv) --- > import Network.Socket.ByteString (recv, sendAll) --- > --- > main :: IO () --- > main = withSocketsDo $ do --- > addr <- resolve "127.0.0.1" "3000" --- > E.bracket (open addr) close talk --- > where --- > resolve host port = do --- > let hints = defaultHints { addrSocketType = Stream } --- > addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) --- > return addr --- > open addr = do --- > sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) --- > connect sock $ addrAddress addr --- > return sock --- > talk sock = do --- > sendAll sock "Hello, world!" --- > msg <- recv sock 1024 --- > putStr "Received: " --- > C.putStrLn msg --- --- The proper programming model is that one 'Socket' is handled by --- a single thread. If multiple threads use one 'Socket' concurrently, --- unexpected things would happen. There is one exception for multiple --- threads vs a single 'Socket': one thread reads data from a 'Socket' --- only and the other thread writes data to the 'Socket' only. ------------------------------------------------------------------------------ - -#include "HsNet.h" -##include "HsNetDef.h" - -module Network.Socket - ( - -- * Initialisation - withSocketsDo - -- * Address information - , getAddrInfo - -- ** Types - , HostName - , ServiceName - , AddrInfo(..) - , defaultHints - -- ** Flags - , AddrInfoFlag(..) - , addrInfoFlagImplemented - -- * Socket operations - , connect - , bind - , listen - , accept - -- ** Closing - , close - , close' - , shutdown - , ShutdownCmd(..) - -- * Socket options - , SocketOption(..) - , isSupportedSocketOption - , getSocketOption - , setSocketOption - -- * Socket - , Socket(..) - , socket - , fdSocket - , mkSocket - , socketToHandle - -- ** Types of Socket - , SocketType(..) - , isSupportedSocketType - -- ** Family - , Family(..) - , isSupportedFamily - -- ** Protocol number - , ProtocolNumber - , defaultProtocol - -- * Socket address - , SockAddr(..) - , isSupportedSockAddr - , getPeerName - , getSocketName - -- ** Host address - , HostAddress - , hostAddressToTuple - , tupleToHostAddress -#if defined(IPV6_SOCKET_SUPPORT) - -- ** Host address6 - , HostAddress6 - , hostAddress6ToTuple - , tupleToHostAddress6 - -- ** Flow Info - , FlowInfo - -- ** Scope ID - , ScopeID -# if defined(HAVE_IF_NAMETOINDEX) - , ifNameToIndex - , ifIndexToName -# endif -#endif - -- ** Port number - , PortNumber(..) - , defaultPort - , socketPortSafe - , socketPort - -- * UNIX-domain socket - , isUnixDomainSocketAvailable - , socketPair - , sendFd - , recvFd - , getPeerCredential -#if defined(IPV6_SOCKET_SUPPORT) - -- * Name information - , NameInfoFlag(..) - , getNameInfo -#endif - -- * Low level operations - , setCloseOnExecIfNeeded - , getCloseOnExec - , setNonBlockIfNeeded - , getNonBlock - -- * Sending and receiving data - , sendBuf - , recvBuf - , sendBufTo - , recvBufFrom - -- * Special constants - , maxListenQueue - -- * Deprecated - -- ** Deprecated sending and receiving - , send - , sendTo - , recv - , recvFrom - , recvLen - -- ** Deprecated address functions - , htonl - , ntohl - , inet_addr - , inet_ntoa - -- ** Deprecated socket operations - , bindSocket - , sClose - -- ** Deprecated socket status - , SocketStatus(..) -- fixme - , isConnected - , isBound - , isListening - , isReadable - , isWritable - , sIsConnected - , sIsBound - , sIsListening - , sIsReadable - , sIsWritable - -- ** Deprecated special constants - , aNY_PORT - , iNADDR_ANY -#if defined(IPV6_SOCKET_SUPPORT) - , iN6ADDR_ANY -#endif - , sOMAXCONN - , sOL_SOCKET -#ifdef SCM_RIGHTS - , sCM_RIGHTS -#endif - -- ** Decrecated internal functions - , packFamily - , unpackFamily - , packSocketType - -- ** Decrecated UNIX-domain functions -#if defined(HAVE_STRUCT_UCRED) || defined(HAVE_GETPEEREID) - -- get the credentials of our domain socket peer. - , getPeerCred -#if defined(HAVE_GETPEEREID) - , getPeerEid -#endif -#endif - ) where - -import Data.Bits -import Data.Functor -import Data.List (foldl') -import Data.Maybe (isJust) -import Data.Word (Word8, Word32) -import Foreign.Ptr (Ptr, castPtr, nullPtr) -import Foreign.Storable (Storable(..)) -import Foreign.C.Error -import Foreign.C.String (CString, withCString, withCStringLen, peekCString, peekCStringLen) -import Foreign.C.Types (CUInt(..), CChar) -import Foreign.C.Types (CInt(..), CSize(..)) -import Foreign.Marshal.Alloc ( alloca, allocaBytes ) -import Foreign.Marshal.Array ( peekArray ) -import Foreign.Marshal.Utils ( maybeWith, with ) - -import System.IO -import Control.Monad (liftM, when) - -import qualified Control.Exception as E -import Control.Concurrent.MVar -import Data.Typeable -import System.IO.Error - -import GHC.Conc (threadWaitWrite) -# ifdef HAVE_ACCEPT4 -import GHC.Conc (threadWaitRead) -# endif -##if MIN_VERSION_base(4,3,1) -import GHC.Conc (closeFdWith) -##endif -# if defined(mingw32_HOST_OS) -import GHC.Conc (asyncDoProc) -import GHC.IO.FD (FD(..), readRawBufferPtr, writeRawBufferPtr) -import Foreign (FunPtr) -# endif -# if defined(darwin_HOST_OS) -import Data.List (delete) -# endif -import qualified GHC.IO.Device -import GHC.IO.Handle.FD -import GHC.IO.Exception -import GHC.IO -import qualified System.Posix.Internals - -import Network.Socket.Internal -import Network.Socket.Types - -import Prelude -- Silence AMP warnings - --- | Either a host name e.g., @\"haskell.org\"@ or a numeric host --- address string consisting of a dotted decimal IPv4 address or an --- IPv6 address e.g., @\"192.168.0.1\"@. -type HostName = String -type ServiceName = String - --- ---------------------------------------------------------------------------- --- On Windows, our sockets are not put in non-blocking mode (non-blocking --- is not supported for regular file descriptors on Windows, and it would --- be a pain to support it only for sockets). So there are two cases: --- --- - the threaded RTS uses safe calls for socket operations to get --- non-blocking I/O, just like the rest of the I/O library --- --- - with the non-threaded RTS, only some operations on sockets will be --- non-blocking. Reads and writes go through the normal async I/O --- system. accept() uses asyncDoProc so is non-blocking. A handful --- of others (recvFrom, sendFd, recvFd) will block all threads - if this --- is a problem, -threaded is the workaround. --- -##if defined(mingw32_HOST_OS) -##define SAFE_ON_WIN safe -##else -##define SAFE_ON_WIN unsafe -##endif - ------------------------------------------------------------------------------ --- Socket types - -#if defined(mingw32_HOST_OS) -socket2FD (MkSocket fd _ _ _ _) = - -- HACK, 1 means True - FD{fdFD = fd,fdIsSocket_ = 1} -#endif - --- | Smart constructor for constructing a 'Socket'. It should only be --- called once for every new file descriptor. The caller must make --- sure that the socket is in non-blocking mode. See --- 'setNonBlockIfNeeded'. -mkSocket :: CInt - -> Family - -> SocketType - -> ProtocolNumber - -> SocketStatus - -> IO Socket -mkSocket fd fam sType pNum stat = do - mStat <- newMVar stat - withSocketsDo $ return () - return $ MkSocket fd fam sType pNum mStat - --- | This is the default protocol for a given service. -defaultProtocol :: ProtocolNumber -defaultProtocol = 0 - ------------------------------------------------------------------------------ --- SockAddr - -instance Show SockAddr where -#if defined(DOMAIN_SOCKET_SUPPORT) - showsPrec _ (SockAddrUnix str) = showString str -#endif - showsPrec _ (SockAddrInet port ha) - = showString (unsafePerformIO (inet_ntoa ha)) - . showString ":" - . shows port -#if defined(IPV6_SOCKET_SUPPORT) - showsPrec _ addr@(SockAddrInet6 port _ _ _) - = showChar '[' - . showString (unsafePerformIO $ - fst `liftM` getNameInfo [NI_NUMERICHOST] True False addr >>= - maybe (fail "showsPrec: impossible internal error") return) - . showString "]:" - . shows port -#endif -#if defined(CAN_SOCKET_SUPPORT) - showsPrec _ (SockAddrCan ifidx) = shows ifidx -#endif -#if !(defined(IPV6_SOCKET_SUPPORT) \ - && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) - showsPrec _ _ = error "showsPrec: not supported" -#endif - ------------------------------------------------------------------------------ --- Connection Functions - --- In the following connection and binding primitives. The names of --- the equivalent C functions have been preserved where possible. It --- should be noted that some of these names used in the C library, --- \tr{bind} in particular, have a different meaning to many Haskell --- programmers and have thus been renamed by appending the prefix --- Socket. - --- | Create a new socket using the given address family, socket type --- and protocol number. The address family is usually 'AF_INET', --- 'AF_INET6', or 'AF_UNIX'. The socket type is usually 'Stream' or --- 'Datagram'. The protocol number is usually 'defaultProtocol'. --- If 'AF_INET6' is used and the socket type is 'Stream' or 'Datagram', --- the 'IPv6Only' socket option is set to 0 so that both IPv4 and IPv6 --- can be handled with one socket. --- --- >>> let hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_NUMERICSERV], addrSocketType = Stream } --- >>> addr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "5000") --- >>> sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) --- >>> bind sock (addrAddress addr) --- >>> getSocketName sock --- 127.0.0.1:5000 -socket :: Family -- Family Name (usually AF_INET) - -> SocketType -- Socket Type (usually Stream) - -> ProtocolNumber -- Protocol Number (getProtocolByName to find value) - -> IO Socket -- Unconnected Socket -socket family stype protocol = do - c_stype <- packSocketTypeOrThrow "socket" stype - fd <- throwSocketErrorIfMinus1Retry "Network.Socket.socket" $ - c_socket (packFamily family) c_stype protocol - setNonBlockIfNeeded fd - sock <- mkSocket fd family stype protocol NotConnected -#if HAVE_DECL_IPV6_V6ONLY - -- The default value of the IPv6Only option is platform specific, - -- so we explicitly set it to 0 to provide a common default. -# if defined(mingw32_HOST_OS) - -- The IPv6Only option is only supported on Windows Vista and later, - -- so trying to change it might throw an error. - when (family == AF_INET6 && (stype == Stream || stype == Datagram)) $ - E.catch (setSocketOption sock IPv6Only 0) $ (\(_ :: E.IOException) -> return ()) -# elif !defined(__OpenBSD__) - when (family == AF_INET6 && (stype == Stream || stype == Datagram)) $ - setSocketOption sock IPv6Only 0 `onException` close sock -# endif -#endif - return sock - --- | Build a pair of connected socket objects using the given address --- family, socket type, and protocol number. Address family, socket --- type, and protocol number are as for the 'socket' function above. --- Availability: Unix. -socketPair :: Family -- Family Name (usually AF_INET or AF_INET6) - -> SocketType -- Socket Type (usually Stream) - -> ProtocolNumber -- Protocol Number - -> IO (Socket, Socket) -- unnamed and connected. -#if defined(DOMAIN_SOCKET_SUPPORT) -socketPair family stype protocol = do - allocaBytes (2 * sizeOf (1 :: CInt)) $ \ fdArr -> do - c_stype <- packSocketTypeOrThrow "socketPair" stype - _rc <- throwSocketErrorIfMinus1Retry "Network.Socket.socketpair" $ - c_socketpair (packFamily family) c_stype protocol fdArr - [fd1,fd2] <- peekArray 2 fdArr - s1 <- mkNonBlockingSocket fd1 - s2 <- mkNonBlockingSocket fd2 - return (s1,s2) - where - mkNonBlockingSocket fd = do - setNonBlockIfNeeded fd - mkSocket fd family stype protocol Connected - -foreign import ccall unsafe "socketpair" - c_socketpair :: CInt -> CInt -> CInt -> Ptr CInt -> IO CInt -#else -socketPair _ _ _ = error "Network.Socket.socketPair" -#endif - ------------------------------------------------------------------------------ - -#if defined(mingw32_HOST_OS) -#else -fGetFd :: CInt -fGetFd = #const F_GETFD -fGetFl :: CInt -fGetFl = #const F_GETFL -fdCloexec :: CInt -fdCloexec = #const FD_CLOEXEC -oNonBlock :: CInt -oNonBlock = #const O_NONBLOCK -# if defined(HAVE_ACCEPT4) -sockNonBlock :: CInt -sockNonBlock = #const SOCK_NONBLOCK -sockCloexec :: CInt -sockCloexec = #const SOCK_CLOEXEC -# endif -#endif - --- | Set the nonblocking flag on Unix. --- On Windows, nothing is done. -setNonBlockIfNeeded :: CInt -> IO () -setNonBlockIfNeeded fd = - System.Posix.Internals.setNonBlockingFD fd True - --- | Set the close_on_exec flag on Unix. --- On Windows, nothing is done. --- --- Since 2.7.0.0. -setCloseOnExecIfNeeded :: CInt -> IO () -#if defined(mingw32_HOST_OS) -setCloseOnExecIfNeeded _ = return () -#else -setCloseOnExecIfNeeded fd = System.Posix.Internals.setCloseOnExec fd -#endif - -#if !defined(mingw32_HOST_OS) -foreign import ccall unsafe "fcntl" - c_fcntl_read :: CInt -> CInt -> CInt -> IO CInt -#endif - --- | Get the nonblocking flag. --- On Windows, this function always returns 'False'. --- --- Since 2.7.0.0. -getCloseOnExec :: CInt -> IO Bool -#if defined(mingw32_HOST_OS) -getCloseOnExec _ = return False -#else -getCloseOnExec fd = do - flags <- c_fcntl_read fd fGetFd 0 - let ret = flags .&. fdCloexec - return (ret /= 0) -#endif - --- | Get the close_on_exec flag. --- On Windows, this function always returns 'False'. --- --- Since 2.7.0.0. -getNonBlock :: CInt -> IO Bool -#if defined(mingw32_HOST_OS) -getNonBlock _ = return False -#else -getNonBlock fd = do - flags <- c_fcntl_read fd fGetFl 0 - let ret = flags .&. oNonBlock - return (ret /= 0) -#endif - ------------------------------------------------------------------------------ --- Binding a socket - --- | Bind the socket to an address. The socket must not already be --- bound. The 'Family' passed to @bind@ must be the --- same as that passed to 'socket'. If the special port number --- 'defaultPort' is passed then the system assigns the next available --- use port. -bind :: Socket -- Unconnected Socket - -> SockAddr -- Address to Bind to - -> IO () -bind (MkSocket s _family _stype _protocol socketStatus) addr = do - modifyMVar_ socketStatus $ \ status -> do - if status /= NotConnected - then - ioError $ userError $ - "Network.Socket.bind: can't bind to socket with status " ++ show status - else do - withSockAddr addr $ \p_addr sz -> do - _status <- throwSocketErrorIfMinus1Retry "Network.Socket.bind" $ - c_bind s p_addr (fromIntegral sz) - return Bound - ------------------------------------------------------------------------------ --- Connecting a socket - --- | Connect to a remote socket at address. -connect :: Socket -- Unconnected Socket - -> SockAddr -- Socket address stuff - -> IO () -connect sock@(MkSocket s _family _stype _protocol socketStatus) addr = withSocketsDo $ do - modifyMVar_ socketStatus $ \currentStatus -> do - if currentStatus /= NotConnected && currentStatus /= Bound - then - ioError $ userError $ - errLoc ++ ": can't connect to socket with status " ++ show currentStatus - else do - withSockAddr addr $ \p_addr sz -> do - - let connectLoop = do - r <- c_connect s p_addr (fromIntegral sz) - if r == -1 - then do -#if !(defined(HAVE_WINSOCK2_H)) - err <- getErrno - case () of - _ | err == eINTR -> connectLoop - _ | err == eINPROGRESS -> connectBlocked --- _ | err == eAGAIN -> connectBlocked - _otherwise -> throwSocketError errLoc -#else - throwSocketError errLoc -#endif - else return () - - connectBlocked = do - threadWaitWrite (fromIntegral s) - err <- getSocketOption sock SoError - if (err == 0) - then return () - else throwSocketErrorCode errLoc (fromIntegral err) - - connectLoop - return Connected - where - errLoc = "Network.Socket.connect: " ++ show sock - ------------------------------------------------------------------------------ --- Listen - --- | Listen for connections made to the socket. The second argument --- specifies the maximum number of queued connections and should be at --- least 1; the maximum value is system-dependent (usually 5). -listen :: Socket -- Connected & Bound Socket - -> Int -- Queue Length - -> IO () -listen (MkSocket s _family _stype _protocol socketStatus) backlog = do - modifyMVar_ socketStatus $ \ status -> do - if status /= Bound - then - ioError $ userError $ - "Network.Socket.listen: can't listen on socket with status " ++ show status - else do - throwSocketErrorIfMinus1Retry_ "Network.Socket.listen" $ - c_listen s (fromIntegral backlog) - return Listening - ------------------------------------------------------------------------------ --- Accept --- --- A call to `accept' only returns when data is available on the given --- socket, unless the socket has been set to non-blocking. It will --- return a new socket which should be used to read the incoming data and --- should then be closed. Using the socket returned by `accept' allows --- incoming requests to be queued on the original socket. - --- | Accept a connection. The socket must be bound to an address and --- listening for connections. The return value is a pair @(conn, --- address)@ where @conn@ is a new socket object usable to send and --- receive data on the connection, and @address@ is the address bound --- to the socket on the other end of the connection. -accept :: Socket -- Queue Socket - -> IO (Socket, -- Readable Socket - SockAddr) -- Peer details - -accept sock@(MkSocket s family stype protocol status) = do - currentStatus <- readMVar status - if not $ isAcceptable family stype currentStatus - then - ioError $ userError $ - "Network.Socket.accept: can't accept socket (" ++ - show (family, stype, protocol) ++ ") with status " ++ - show currentStatus - else do - let sz = sizeOfSockAddrByFamily family - allocaBytes sz $ \ sockaddr -> do -#if defined(mingw32_HOST_OS) - new_sock <- - if threaded - then with (fromIntegral sz) $ \ ptr_len -> - throwSocketErrorIfMinus1Retry "Network.Socket.accept" $ - c_accept_safe s sockaddr ptr_len - else do - paramData <- c_newAcceptParams s (fromIntegral sz) sockaddr - rc <- asyncDoProc c_acceptDoProc paramData - new_sock <- c_acceptNewSock paramData - c_free paramData - when (rc /= 0) $ - throwSocketErrorCode "Network.Socket.accept" (fromIntegral rc) - return new_sock -#else - with (fromIntegral sz) $ \ ptr_len -> do -# ifdef HAVE_ACCEPT4 - new_sock <- throwSocketErrorIfMinus1RetryMayBlock "Network.Socket.accept" - (threadWaitRead (fromIntegral s)) - (c_accept4 s sockaddr ptr_len (sockNonBlock .|. sockCloexec)) -# else - new_sock <- throwSocketErrorWaitRead sock "Network.Socket.accept" - (c_accept s sockaddr ptr_len) - setNonBlockIfNeeded new_sock - setCloseOnExecIfNeeded new_sock -# endif /* HAVE_ACCEPT4 */ -#endif - addr <- peekSockAddr sockaddr - sock' <- mkSocket new_sock family stype protocol Connected - return (sock', addr) - -#if defined(mingw32_HOST_OS) -foreign import ccall unsafe "HsNet.h acceptNewSock" - c_acceptNewSock :: Ptr () -> IO CInt -foreign import ccall unsafe "HsNet.h newAcceptParams" - c_newAcceptParams :: CInt -> CInt -> Ptr a -> IO (Ptr ()) -foreign import ccall unsafe "HsNet.h &acceptDoProc" - c_acceptDoProc :: FunPtr (Ptr () -> IO Int) -foreign import ccall unsafe "free" - c_free:: Ptr a -> IO () -#endif - ------------------------------------------------------------------------------ --- ** Sending and receiving data - --- $sendrecv --- --- Do not use the @send@ and @recv@ functions defined in this section --- in new code, as they incorrectly represent binary data as a Unicode --- string. As a result, these functions are inefficient and may lead --- to bugs in the program. Instead use the @send@ and @recv@ --- functions defined in the "Network.Socket.ByteString" module. - ------------------------------------------------------------------------------ --- sendTo & recvFrom - --- | Send data to the socket. The recipient can be specified --- explicitly, so the socket need not be in a connected state. --- Returns the number of bytes sent. Applications are responsible for --- ensuring that all data has been sent. --- --- NOTE: blocking on Windows unless you compile with -threaded (see --- GHC ticket #1129) -{-# DEPRECATED sendTo "Use sendTo defined in \"Network.Socket.ByteString\"" #-} -sendTo :: Socket -- (possibly) bound/connected Socket - -> String -- Data to send - -> SockAddr - -> IO Int -- Number of Bytes sent -sendTo sock xs addr = do - withCStringLen xs $ \(str, len) -> do - sendBufTo sock str len addr - --- | Send data to the socket. The recipient can be specified --- explicitly, so the socket need not be in a connected state. --- Returns the number of bytes sent. Applications are responsible for --- ensuring that all data has been sent. -sendBufTo :: Socket -- (possibly) bound/connected Socket - -> Ptr a -> Int -- Data to send - -> SockAddr - -> IO Int -- Number of Bytes sent -sendBufTo sock@(MkSocket s _family _stype _protocol _status) ptr nbytes addr = do - withSockAddr addr $ \p_addr sz -> do - liftM fromIntegral $ - throwSocketErrorWaitWrite sock "Network.Socket.sendBufTo" $ - c_sendto s ptr (fromIntegral $ nbytes) 0{-flags-} - p_addr (fromIntegral sz) - --- | Receive data from the socket. The socket need not be in a --- connected state. Returns @(bytes, nbytes, address)@ where @bytes@ --- is a @String@ of length @nbytes@ representing the data received and --- @address@ is a 'SockAddr' representing the address of the sending --- socket. --- --- NOTE: blocking on Windows unless you compile with -threaded (see --- GHC ticket #1129) -{-# DEPRECATED recvFrom "Use recvFrom defined in \"Network.Socket.ByteString\"" #-} -recvFrom :: Socket -> Int -> IO (String, Int, SockAddr) -recvFrom sock nbytes = - allocaBytes nbytes $ \ptr -> do - (len, sockaddr) <- recvBufFrom sock ptr nbytes - str <- peekCStringLen (ptr, len) - return (str, len, sockaddr) - --- | Receive data from the socket, writing it into buffer instead of --- creating a new string. The socket need not be in a connected --- state. Returns @(nbytes, address)@ where @nbytes@ is the number of --- bytes received and @address@ is a 'SockAddr' representing the --- address of the sending socket. --- --- NOTE: blocking on Windows unless you compile with -threaded (see --- GHC ticket #1129) -recvBufFrom :: Socket -> Ptr a -> Int -> IO (Int, SockAddr) -recvBufFrom sock@(MkSocket s family _stype _protocol _status) ptr nbytes - | nbytes <= 0 = ioError (mkInvalidRecvArgError "Network.Socket.recvBufFrom") - | otherwise = - withNewSockAddr family $ \ptr_addr sz -> do - alloca $ \ptr_len -> do - poke ptr_len (fromIntegral sz) - len <- throwSocketErrorWaitRead sock "Network.Socket.recvBufFrom" $ - c_recvfrom s ptr (fromIntegral nbytes) 0{-flags-} - ptr_addr ptr_len - let len' = fromIntegral len - if len' == 0 - then ioError (mkEOFError "Network.Socket.recvFrom") - else do - flg <- isConnected sock - -- For at least one implementation (WinSock 2), recvfrom() ignores - -- filling in the sockaddr for connected TCP sockets. Cope with - -- this by using getPeerName instead. - sockaddr <- - if flg then - getPeerName sock - else - peekSockAddr ptr_addr - return (len', sockaddr) - ------------------------------------------------------------------------------ --- send & recv - --- | Send data to the socket. The socket must be connected to a remote --- socket. Returns the number of bytes sent. Applications are --- responsible for ensuring that all data has been sent. --- --- Sending data to closed socket may lead to undefined behaviour. -{-# DEPRECATED send "Use send defined in \"Network.Socket.ByteString\"" #-} -send :: Socket -- Bound/Connected Socket - -> String -- Data to send - -> IO Int -- Number of Bytes sent -send sock xs = withCStringLen xs $ \(str, len) -> - sendBuf sock (castPtr str) len - --- | Send data to the socket. The socket must be connected to a remote --- socket. Returns the number of bytes sent. Applications are --- responsible for ensuring that all data has been sent. --- --- Sending data to closed socket may lead to undefined behaviour. -sendBuf :: Socket -- Bound/Connected Socket - -> Ptr Word8 -- Pointer to the data to send - -> Int -- Length of the buffer - -> IO Int -- Number of Bytes sent -sendBuf sock@(MkSocket s _family _stype _protocol _status) str len = do - liftM fromIntegral $ -#if defined(mingw32_HOST_OS) --- writeRawBufferPtr is supposed to handle checking for errors, but it's broken --- on x86_64 because of GHC bug #12010 so we duplicate the check here. The call --- to throwSocketErrorIfMinus1Retry can be removed when no GHC version with the --- bug is supported. - throwSocketErrorIfMinus1Retry "Network.Socket.sendBuf" $ writeRawBufferPtr - "Network.Socket.sendBuf" - (socket2FD sock) - (castPtr str) - 0 - (fromIntegral len) -#else - throwSocketErrorWaitWrite sock "Network.Socket.sendBuf" $ - c_send s str (fromIntegral len) 0{-flags-} -#endif - - --- | Receive data from the socket. The socket must be in a connected --- state. This function may return fewer bytes than specified. If the --- message is longer than the specified length, it may be discarded --- depending on the type of socket. This function may block until a --- message arrives. --- --- Considering hardware and network realities, the maximum number of --- bytes to receive should be a small power of 2, e.g., 4096. --- --- For TCP sockets, a zero length return value means the peer has --- closed its half side of the connection. --- --- Receiving data from closed socket may lead to undefined behaviour. -{-# DEPRECATED recv "Use recv defined in \"Network.Socket.ByteString\"" #-} -recv :: Socket -> Int -> IO String -recv sock l = fst <$> recvLen sock l - -{-# DEPRECATED recvLen "Use recv defined in \"Network.Socket.ByteString\" with \"Data.Bytestring.length\"" #-} -recvLen :: Socket -> Int -> IO (String, Int) -recvLen sock nbytes = - allocaBytes nbytes $ \ptr -> do - len <- recvBuf sock ptr nbytes - s <- peekCStringLen (castPtr ptr,len) - return (s, len) - --- | Receive data from the socket. The socket must be in a connected --- state. This function may return fewer bytes than specified. If the --- message is longer than the specified length, it may be discarded --- depending on the type of socket. This function may block until a --- message arrives. --- --- Considering hardware and network realities, the maximum number of --- bytes to receive should be a small power of 2, e.g., 4096. --- --- For TCP sockets, a zero length return value means the peer has --- closed its half side of the connection. --- --- Receiving data from closed socket may lead to undefined behaviour. -recvBuf :: Socket -> Ptr Word8 -> Int -> IO Int -recvBuf sock@(MkSocket s _family _stype _protocol _status) ptr nbytes - | nbytes <= 0 = ioError (mkInvalidRecvArgError "Network.Socket.recvBuf") - | otherwise = do - len <- -#if defined(mingw32_HOST_OS) --- see comment in sendBuf above. - throwSocketErrorIfMinus1Retry "Network.Socket.recvBuf" $ - readRawBufferPtr "Network.Socket.recvBuf" - (socket2FD sock) ptr 0 (fromIntegral nbytes) -#else - throwSocketErrorWaitRead sock "Network.Socket.recvBuf" $ - c_recv s (castPtr ptr) (fromIntegral nbytes) 0{-flags-} -#endif - let len' = fromIntegral len - if len' == 0 - then ioError (mkEOFError "Network.Socket.recvBuf") - else return len' - - --- --------------------------------------------------------------------------- --- socketPort --- --- The port number the given socket is currently connected to can be --- determined by calling $port$, is generally only useful when bind --- was given $aNY\_PORT$. - --- | Getting the port of socket. --- `IOError` is thrown if a port is not available. -socketPort :: Socket -- Connected & Bound Socket - -> IO PortNumber -- Port Number of Socket -socketPort sock@(MkSocket _ AF_INET _ _ _) = do - (SockAddrInet port _) <- getSocketName sock - return port -#if defined(IPV6_SOCKET_SUPPORT) -socketPort sock@(MkSocket _ AF_INET6 _ _ _) = do - (SockAddrInet6 port _ _ _) <- getSocketName sock - return port -#endif -socketPort (MkSocket _ family _ _ _) = - ioError $ userError $ - "Network.Socket.socketPort: address family '" ++ show family ++ - "' not supported." - - --- --------------------------------------------------------------------------- --- socketPortSafe --- | Getting the port of socket. -socketPortSafe :: Socket -- Connected & Bound Socket - -> IO (Maybe PortNumber) -- Port Number of Socket -socketPortSafe s = do - sa <- getSocketName s - return $ case sa of - SockAddrInet port _ -> Just port -#if defined(IPV6_SOCKET_SUPPORT) - SockAddrInet6 port _ _ _ -> Just port -#endif - _ -> Nothing - --- --------------------------------------------------------------------------- --- getPeerName - --- Calling $getPeerName$ returns the address details of the machine, --- other than the local one, which is connected to the socket. This is --- used in programs such as FTP to determine where to send the --- returning data. The corresponding call to get the details of the --- local machine is $getSocketName$. - -getPeerName :: Socket -> IO SockAddr -getPeerName (MkSocket s family _ _ _) = do - withNewSockAddr family $ \ptr sz -> do - with (fromIntegral sz) $ \int_star -> do - throwSocketErrorIfMinus1Retry_ "Network.Socket.getPeerName" $ - c_getpeername s ptr int_star - _sz <- peek int_star - peekSockAddr ptr - -getSocketName :: Socket -> IO SockAddr -getSocketName (MkSocket s family _ _ _) = do - withNewSockAddr family $ \ptr sz -> do - with (fromIntegral sz) $ \int_star -> do - throwSocketErrorIfMinus1Retry_ "Network.Socket.getSocketName" $ - c_getsockname s ptr int_star - peekSockAddr ptr - ------------------------------------------------------------------------------ --- Socket Properties - --- | Socket options for use with 'setSocketOption' and 'getSocketOption'. --- --- The existence of a constructor does not imply that the relevant option --- is supported on your system: see 'isSupportedSocketOption' -data SocketOption - = Debug -- ^ SO_DEBUG - | ReuseAddr -- ^ SO_REUSEADDR - | Type -- ^ SO_TYPE - | SoError -- ^ SO_ERROR - | DontRoute -- ^ SO_DONTROUTE - | Broadcast -- ^ SO_BROADCAST - | SendBuffer -- ^ SO_SNDBUF - | RecvBuffer -- ^ SO_RCVBUF - | KeepAlive -- ^ SO_KEEPALIVE - | OOBInline -- ^ SO_OOBINLINE - | TimeToLive -- ^ IP_TTL - | MaxSegment -- ^ TCP_MAXSEG - | NoDelay -- ^ TCP_NODELAY - | Cork -- ^ TCP_CORK - | Linger -- ^ SO_LINGER - | ReusePort -- ^ SO_REUSEPORT - | RecvLowWater -- ^ SO_RCVLOWAT - | SendLowWater -- ^ SO_SNDLOWAT - | RecvTimeOut -- ^ SO_RCVTIMEO - | SendTimeOut -- ^ SO_SNDTIMEO - | UseLoopBack -- ^ SO_USELOOPBACK - | UserTimeout -- ^ TCP_USER_TIMEOUT - | IPv6Only -- ^ IPV6_V6ONLY - | CustomSockOpt (CInt, CInt) - deriving (Show, Typeable) - --- | Does the 'SocketOption' exist on this system? -isSupportedSocketOption :: SocketOption -> Bool -isSupportedSocketOption = isJust . packSocketOption - --- | For a socket option, return Just (level, value) where level is the --- corresponding C option level constant (e.g. SOL_SOCKET) and value is --- the option constant itself (e.g. SO_DEBUG) --- If either constant does not exist, return Nothing. -packSocketOption :: SocketOption -> Maybe (CInt, CInt) -packSocketOption so = - -- The Just here is a hack to disable GHC's overlapping pattern detection: - -- the problem is if all constants are present, the fallback pattern is - -- redundant, but if they aren't then it isn't. Hence we introduce an - -- extra pattern (Nothing) that can't possibly happen, so that the - -- fallback is always (in principle) necessary. - -- I feel a little bad for including this, but such are the sacrifices we - -- make while working with CPP - excluding the fallback pattern correctly - -- would be a serious nuisance. - -- (NB: comments elsewhere in this file refer to this one) - case Just so of -#ifdef SOL_SOCKET -#ifdef SO_DEBUG - Just Debug -> Just ((#const SOL_SOCKET), (#const SO_DEBUG)) -#endif -#ifdef SO_REUSEADDR - Just ReuseAddr -> Just ((#const SOL_SOCKET), (#const SO_REUSEADDR)) -#endif -#ifdef SO_TYPE - Just Type -> Just ((#const SOL_SOCKET), (#const SO_TYPE)) -#endif -#ifdef SO_ERROR - Just SoError -> Just ((#const SOL_SOCKET), (#const SO_ERROR)) -#endif -#ifdef SO_DONTROUTE - Just DontRoute -> Just ((#const SOL_SOCKET), (#const SO_DONTROUTE)) -#endif -#ifdef SO_BROADCAST - Just Broadcast -> Just ((#const SOL_SOCKET), (#const SO_BROADCAST)) -#endif -#ifdef SO_SNDBUF - Just SendBuffer -> Just ((#const SOL_SOCKET), (#const SO_SNDBUF)) -#endif -#ifdef SO_RCVBUF - Just RecvBuffer -> Just ((#const SOL_SOCKET), (#const SO_RCVBUF)) -#endif -#ifdef SO_KEEPALIVE - Just KeepAlive -> Just ((#const SOL_SOCKET), (#const SO_KEEPALIVE)) -#endif -#ifdef SO_OOBINLINE - Just OOBInline -> Just ((#const SOL_SOCKET), (#const SO_OOBINLINE)) -#endif -#ifdef SO_LINGER - Just Linger -> Just ((#const SOL_SOCKET), (#const SO_LINGER)) -#endif -#ifdef SO_REUSEPORT - Just ReusePort -> Just ((#const SOL_SOCKET), (#const SO_REUSEPORT)) -#endif -#ifdef SO_RCVLOWAT - Just RecvLowWater -> Just ((#const SOL_SOCKET), (#const SO_RCVLOWAT)) -#endif -#ifdef SO_SNDLOWAT - Just SendLowWater -> Just ((#const SOL_SOCKET), (#const SO_SNDLOWAT)) -#endif -#ifdef SO_RCVTIMEO - Just RecvTimeOut -> Just ((#const SOL_SOCKET), (#const SO_RCVTIMEO)) -#endif -#ifdef SO_SNDTIMEO - Just SendTimeOut -> Just ((#const SOL_SOCKET), (#const SO_SNDTIMEO)) -#endif -#ifdef SO_USELOOPBACK - Just UseLoopBack -> Just ((#const SOL_SOCKET), (#const SO_USELOOPBACK)) -#endif -#endif // SOL_SOCKET -#if HAVE_DECL_IPPROTO_IP -#ifdef IP_TTL - Just TimeToLive -> Just ((#const IPPROTO_IP), (#const IP_TTL)) -#endif -#endif // HAVE_DECL_IPPROTO_IP -#if HAVE_DECL_IPPROTO_TCP -#ifdef TCP_MAXSEG - Just MaxSegment -> Just ((#const IPPROTO_TCP), (#const TCP_MAXSEG)) -#endif -#ifdef TCP_NODELAY - Just NoDelay -> Just ((#const IPPROTO_TCP), (#const TCP_NODELAY)) -#endif -#ifdef TCP_USER_TIMEOUT - Just UserTimeout -> Just ((#const IPPROTO_TCP), (#const TCP_USER_TIMEOUT)) -#endif -#ifdef TCP_CORK - Just Cork -> Just ((#const IPPROTO_TCP), (#const TCP_CORK)) -#endif -#endif // HAVE_DECL_IPPROTO_TCP -#if HAVE_DECL_IPPROTO_IPV6 -#if HAVE_DECL_IPV6_V6ONLY - Just IPv6Only -> Just ((#const IPPROTO_IPV6), (#const IPV6_V6ONLY)) -#endif -#endif // HAVE_DECL_IPPROTO_IPV6 - Just (CustomSockOpt opt) -> Just opt - _ -> Nothing - --- | Return the option level and option value if they exist, --- otherwise throw an error that begins "Network.Socket." ++ the String --- parameter -packSocketOption' :: String -> SocketOption -> IO (CInt, CInt) -packSocketOption' caller so = maybe err return (packSocketOption so) - where - err = ioError . userError . concat $ ["Network.Socket.", caller, - ": socket option ", show so, " unsupported on this system"] - --- | Set a socket option that expects an Int value. --- There is currently no API to set e.g. the timeval socket options -setSocketOption :: Socket - -> SocketOption -- Option Name - -> Int -- Option Value - -> IO () -setSocketOption (MkSocket s _ _ _ _) so v = do - (level, opt) <- packSocketOption' "setSocketOption" so - with (fromIntegral v) $ \ptr_v -> do - throwSocketErrorIfMinus1_ "Network.Socket.setSocketOption" $ - c_setsockopt s level opt ptr_v - (fromIntegral (sizeOf (undefined :: CInt))) - return () - - --- | Get a socket option that gives an Int value. --- There is currently no API to get e.g. the timeval socket options -getSocketOption :: Socket - -> SocketOption -- Option Name - -> IO Int -- Option Value -getSocketOption (MkSocket s _ _ _ _) so = do - (level, opt) <- packSocketOption' "getSocketOption" so - alloca $ \ptr_v -> - with (fromIntegral (sizeOf (undefined :: CInt))) $ \ptr_sz -> do - throwSocketErrorIfMinus1Retry_ "Network.Socket.getSocketOption" $ - c_getsockopt s level opt ptr_v ptr_sz - fromIntegral `liftM` peek ptr_v - - --- | Getting process ID, user ID and group ID for UNIX-domain sockets. --- --- This is implemented with SO_PEERCRED on Linux and getpeereid() --- on BSD variants. Unfortunately, on some BSD variants --- getpeereid() returns unexpected results, rather than an error, --- for AF_INET sockets. It is the user's responsibility to make sure --- that the socket is a UNIX-domain socket. --- Also, on some BSD variants, getpeereid() does not return credentials --- for sockets created via 'socketPair', only separately created and then --- explicitly connected UNIX-domain sockets work on such systems. --- --- Since 2.7.0.0. -getPeerCredential :: Socket -> IO (Maybe CUInt, Maybe CUInt, Maybe CUInt) -#ifdef HAVE_STRUCT_UCRED -getPeerCredential sock = do - (pid, uid, gid) <- getPeerCred sock - if uid == maxBound then - return (Nothing, Nothing, Nothing) - else - return (Just pid, Just uid, Just gid) -#elif defined(HAVE_GETPEEREID) -getPeerCredential sock = E.handle (\(E.SomeException _) -> return (Nothing,Nothing,Nothing)) $ do - (uid, gid) <- getPeerEid sock - return (Nothing, Just uid, Just gid) -#else -getPeerCredential _ = return (Nothing, Nothing, Nothing) -#endif - -#if defined(HAVE_STRUCT_UCRED) || defined(HAVE_GETPEEREID) -{-# DEPRECATED getPeerCred "Use getPeerCredential instead" #-} --- | Returns the processID, userID and groupID of the socket's peer. --- --- Only available on platforms that support SO_PEERCRED or GETPEEREID(3) --- on domain sockets. --- GETPEEREID(3) returns userID and groupID. processID is always 0. -getPeerCred :: Socket -> IO (CUInt, CUInt, CUInt) -getPeerCred sock = do -#ifdef HAVE_STRUCT_UCRED - let fd = fdSocket sock - let sz = (#const sizeof(struct ucred)) - allocaBytes sz $ \ ptr_cr -> - with (fromIntegral sz) $ \ ptr_sz -> do - _ <- ($) throwSocketErrorIfMinus1Retry "Network.Socket.getPeerCred" $ - c_getsockopt fd (#const SOL_SOCKET) (#const SO_PEERCRED) ptr_cr ptr_sz - pid <- (#peek struct ucred, pid) ptr_cr - uid <- (#peek struct ucred, uid) ptr_cr - gid <- (#peek struct ucred, gid) ptr_cr - return (pid, uid, gid) -#else - (uid,gid) <- getPeerEid sock - return (0,uid,gid) -#endif - -#ifdef HAVE_GETPEEREID -{-# DEPRECATED getPeerEid "Use getPeerCredential instead" #-} --- | The getpeereid() function returns the effective user and group IDs of the --- peer connected to a UNIX-domain socket -getPeerEid :: Socket -> IO (CUInt, CUInt) -getPeerEid sock = do - let fd = fdSocket sock - alloca $ \ ptr_uid -> - alloca $ \ ptr_gid -> do - throwSocketErrorIfMinus1Retry_ "Network.Socket.getPeerEid" $ - c_getpeereid fd ptr_uid ptr_gid - uid <- peek ptr_uid - gid <- peek ptr_gid - return (uid, gid) -#endif -#endif - --- | Whether or not UNIX-domain sockets are available. --- --- Since 3.0.0.0. -isUnixDomainSocketAvailable :: Bool -#if defined(DOMAIN_SOCKET_SUPPORT) -isUnixDomainSocketAvailable = True -#else -isUnixDomainSocketAvailable = False -#endif - -##if !(MIN_VERSION_base(4,3,1)) -closeFdWith closer fd = closer fd -##endif - --- sending/receiving ancillary socket data; low-level mechanism --- for transmitting file descriptors, mainly. -sendFd :: Socket -> CInt -> IO () -#if defined(DOMAIN_SOCKET_SUPPORT) -sendFd sock outfd = do - _ <- throwSocketErrorWaitWrite sock "Network.Socket.sendFd" $ c_sendFd (fdSocket sock) outfd - return () -foreign import ccall SAFE_ON_WIN "sendFd" c_sendFd :: CInt -> CInt -> IO CInt -#else -sendFd _ _ = error "Network.Socket.sendFd" -#endif - --- | Receive a file descriptor over a domain socket. Note that the resulting --- file descriptor may have to be put into non-blocking mode in order to be --- used safely. See 'setNonBlockIfNeeded'. -recvFd :: Socket -> IO CInt -#if defined(DOMAIN_SOCKET_SUPPORT) -recvFd sock = do - theFd <- throwSocketErrorWaitRead sock "Network.Socket.recvFd" $ - c_recvFd (fdSocket sock) - return theFd -foreign import ccall SAFE_ON_WIN "recvFd" c_recvFd :: CInt -> IO CInt -#else -recvFd _ = error "Network.Socket.recvFd" -#endif - --- --------------------------------------------------------------------------- --- Utility Functions - -{-# DEPRECATED aNY_PORT "Use defaultPort instead" #-} -aNY_PORT :: PortNumber -aNY_PORT = 0 - -defaultPort :: PortNumber -defaultPort = 0 - --- | The IPv4 wild card address. - -{-# DEPRECATED iNADDR_ANY "Use getAddrInfo instead" #-} -iNADDR_ANY :: HostAddress -iNADDR_ANY = htonl (#const INADDR_ANY) - --- | Converts the from host byte order to network byte order. -foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32 --- | Converts the from network byte order to host byte order. -foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32 - -{-# DEPRECATED htonl "Use getAddrInfo instead" #-} -{-# DEPRECATED ntohl "Use getAddrInfo instead" #-} - -#if defined(IPV6_SOCKET_SUPPORT) --- | The IPv6 wild card address. - -{-# DEPRECATED iN6ADDR_ANY "Use getAddrInfo instead" #-} -iN6ADDR_ANY :: HostAddress6 -iN6ADDR_ANY = (0, 0, 0, 0) -#endif - -{-# DEPRECATED sOMAXCONN "Use maxListenQueue instead" #-} -sOMAXCONN :: Int -sOMAXCONN = #const SOMAXCONN - -{-# DEPRECATED sOL_SOCKET "This is not necessary anymore" #-} -sOL_SOCKET :: Int -sOL_SOCKET = #const SOL_SOCKET - -#ifdef SCM_RIGHTS -{-# DEPRECATED sCM_RIGHTS "This is not necessary anymore" #-} -sCM_RIGHTS :: Int -sCM_RIGHTS = #const SCM_RIGHTS -#endif - --- | This is the value of SOMAXCONN, typically 128. --- 128 is good enough for normal network servers but --- is too small for high performance servers. -maxListenQueue :: Int -maxListenQueue = sOMAXCONN - --- ----------------------------------------------------------------------------- - -data ShutdownCmd - = ShutdownReceive - | ShutdownSend - | ShutdownBoth - deriving Typeable - -sdownCmdToInt :: ShutdownCmd -> CInt -sdownCmdToInt ShutdownReceive = 0 -sdownCmdToInt ShutdownSend = 1 -sdownCmdToInt ShutdownBoth = 2 - --- | Shut down one or both halves of the connection, depending on the --- second argument to the function. If the second argument is --- 'ShutdownReceive', further receives are disallowed. If it is --- 'ShutdownSend', further sends are disallowed. If it is --- 'ShutdownBoth', further sends and receives are disallowed. -shutdown :: Socket -> ShutdownCmd -> IO () -shutdown (MkSocket s _ _ _ _) stype = do - throwSocketErrorIfMinus1Retry_ "Network.Socket.shutdown" $ - c_shutdown s (sdownCmdToInt stype) - return () - --- ----------------------------------------------------------------------------- - --- | Close the socket. This function does not throw exceptions even if --- the underlying system call returns errors. --- --- Sending data to or receiving data from closed socket --- may lead to undefined behaviour. --- --- If multiple threads use the same socket and one uses 'fdSocket' and --- the other use 'close', unexpected behavior may happen. --- For more information, please refer to the documentation of 'fdSocket'. -close :: Socket -> IO () -close (MkSocket s _ _ _ socketStatus) = modifyMVar_ socketStatus $ \ status -> - case status of - ConvertedToHandle -> return ConvertedToHandle - Closed -> return Closed - _ -> do - -- closeFdWith avoids the deadlock of IO manager. - closeFdWith (void . c_close . fromIntegral) (fromIntegral s) - return Closed - --- | Close the socket. This function throws exceptions if --- the underlying system call returns errors. --- --- Sending data to or receiving data from closed socket --- may lead to undefined behaviour. -close' :: Socket -> IO () -close' (MkSocket s _ _ _ socketStatus) = modifyMVar_ socketStatus $ \ status -> - case status of - ConvertedToHandle -> ioError (userError ("close: converted to a Handle, use hClose instead")) - Closed -> return Closed - _ -> do - -- closeFdWith avoids the deadlock of IO manager. - -- closeFd throws exceptions. - closeFdWith (closeFd . fromIntegral) (fromIntegral s) - return Closed - --- ----------------------------------------------------------------------------- - --- | Determines whether 'close' has been used on the 'Socket'. This --- does /not/ indicate any status about the socket beyond this. If the --- socket has been closed remotely, this function can still return --- 'True'. -isConnected :: Socket -> IO Bool -isConnected (MkSocket _ _ _ _ status) = do - value <- readMVar status - return (value == Connected) -{-# DEPRECATED isConnected "SocketStatus will be removed" #-} - --- ----------------------------------------------------------------------------- --- Socket Predicates - -isBound :: Socket -> IO Bool -isBound (MkSocket _ _ _ _ status) = do - value <- readMVar status - return (value == Bound) -{-# DEPRECATED isBound "SocketStatus will be removed" #-} - -isListening :: Socket -> IO Bool -isListening (MkSocket _ _ _ _ status) = do - value <- readMVar status - return (value == Listening) -{-# DEPRECATED isListening "SocketStatus will be removed" #-} - -isReadable :: Socket -> IO Bool -isReadable (MkSocket _ _ _ _ status) = do - value <- readMVar status - return (value == Listening || value == Connected) -{-# DEPRECATED isReadable "SocketStatus will be removed" #-} - -isWritable :: Socket -> IO Bool -isWritable = isReadable -- sort of. -{-# DEPRECATED isWritable "SocketStatus will be removed" #-} - -isAcceptable :: Family -> SocketType -> SocketStatus -> Bool -#if defined(DOMAIN_SOCKET_SUPPORT) -isAcceptable AF_UNIX sockTyp status - | sockTyp == Stream || sockTyp == SeqPacket = - status == Connected || status == Bound || status == Listening -isAcceptable AF_UNIX _ _ = False -#endif -isAcceptable _ _ status = status == Connected || status == Listening -{-# DEPRECATED isAcceptable "SocketStatus will be removed" #-} - --- ----------------------------------------------------------------------------- --- Internet address manipulation routines: - -{-# DEPRECATED inet_addr "Use \"getAddrInfo\" instead" #-} -inet_addr :: String -> IO HostAddress -inet_addr ipstr = withSocketsDo $ do - withCString ipstr $ \str -> do - had <- c_inet_addr str - if had == maxBound - then ioError $ userError $ - "Network.Socket.inet_addr: Malformed address: " ++ ipstr - else return had -- network byte order - -{-# DEPRECATED inet_ntoa "Use \"getNameInfo\" instead" #-} -inet_ntoa :: HostAddress -> IO String -inet_ntoa haddr = withSocketsDo $ do - pstr <- c_inet_ntoa haddr - peekCString pstr - --- | Turns a Socket into an 'Handle'. By default, the new handle is --- unbuffered. Use 'System.IO.hSetBuffering' to change the buffering. --- --- Note that since a 'Handle' is automatically closed by a finalizer --- when it is no longer referenced, you should avoid doing any more --- operations on the 'Socket' after calling 'socketToHandle'. To --- close the 'Socket' after 'socketToHandle', call 'System.IO.hClose' --- on the 'Handle'. - -socketToHandle :: Socket -> IOMode -> IO Handle -socketToHandle s@(MkSocket fd _ _ _ socketStatus) mode = do - modifyMVar socketStatus $ \ status -> - if status == ConvertedToHandle - then ioError (userError ("socketToHandle: already a Handle")) - else do - h <- fdToHandle' (fromIntegral fd) (Just GHC.IO.Device.Stream) True (show s) mode True{-bin-} - hSetBuffering h NoBuffering - return (ConvertedToHandle, h) - --- | Pack a list of values into a bitmask. The possible mappings from --- value to bit-to-set are given as the first argument. We assume --- that each value can cause exactly one bit to be set; unpackBits will --- break if this property is not true. - -packBits :: (Eq a, Num b, Bits b) => [(a, b)] -> [a] -> b - -packBits mapping xs = foldl' pack 0 mapping - where pack acc (k, v) | k `elem` xs = acc .|. v - | otherwise = acc - --- | Unpack a bitmask into a list of values. - -unpackBits :: (Num b, Bits b) => [(a, b)] -> b -> [a] - --- Be permissive and ignore unknown bit values. At least on OS X, --- getaddrinfo returns an ai_flags field with bits set that have no --- entry in . -unpackBits [] _ = [] -unpackBits ((k,v):xs) r - | r .&. v /= 0 = k : unpackBits xs (r .&. complement v) - | otherwise = unpackBits xs r - ------------------------------------------------------------------------------ --- Address and service lookups - -#if defined(IPV6_SOCKET_SUPPORT) - --- | Flags that control the querying behaviour of 'getAddrInfo'. --- For more information, see -data AddrInfoFlag = - -- | The list of returned 'AddrInfo' values will - -- only contain IPv4 addresses if the local system has at least - -- one IPv4 interface configured, and likewise for IPv6. - -- (Only some platforms support this.) - AI_ADDRCONFIG - -- | If 'AI_ALL' is specified, return all matching IPv6 and - -- IPv4 addresses. Otherwise, this flag has no effect. - -- (Only some platforms support this.) - | AI_ALL - -- | The 'addrCanonName' field of the first returned - -- 'AddrInfo' will contain the "canonical name" of the host. - | AI_CANONNAME - -- | The 'HostName' argument /must/ be a numeric - -- address in string form, and network name lookups will not be - -- attempted. - | AI_NUMERICHOST - -- | The 'ServiceName' argument /must/ be a port - -- number in string form, and service name lookups will not be - -- attempted. (Only some platforms support this.) - | AI_NUMERICSERV - -- | If no 'HostName' value is provided, the network - -- address in each 'SockAddr' - -- will be left as a "wild card". - -- This is useful for server applications that - -- will accept connections from any client. - | AI_PASSIVE - -- | If an IPv6 lookup is performed, and no IPv6 - -- addresses are found, IPv6-mapped IPv4 addresses will be - -- returned. (Only some platforms support this.) - | AI_V4MAPPED - deriving (Eq, Read, Show, Typeable) - -aiFlagMapping :: [(AddrInfoFlag, CInt)] - -aiFlagMapping = - [ -#if HAVE_DECL_AI_ADDRCONFIG - (AI_ADDRCONFIG, #const AI_ADDRCONFIG), -#else - (AI_ADDRCONFIG, 0), -#endif -#if HAVE_DECL_AI_ALL - (AI_ALL, #const AI_ALL), -#else - (AI_ALL, 0), -#endif - (AI_CANONNAME, #const AI_CANONNAME), - (AI_NUMERICHOST, #const AI_NUMERICHOST), -#if HAVE_DECL_AI_NUMERICSERV - (AI_NUMERICSERV, #const AI_NUMERICSERV), -#else - (AI_NUMERICSERV, 0), -#endif - (AI_PASSIVE, #const AI_PASSIVE), -#if HAVE_DECL_AI_V4MAPPED - (AI_V4MAPPED, #const AI_V4MAPPED) -#else - (AI_V4MAPPED, 0) -#endif - ] - --- | Indicate whether the given 'AddrInfoFlag' will have any effect on --- this system. -addrInfoFlagImplemented :: AddrInfoFlag -> Bool -addrInfoFlagImplemented f = packBits aiFlagMapping [f] /= 0 - -data AddrInfo = - AddrInfo { - addrFlags :: [AddrInfoFlag], - addrFamily :: Family, - addrSocketType :: SocketType, - addrProtocol :: ProtocolNumber, - addrAddress :: SockAddr, - addrCanonName :: Maybe String - } - deriving (Eq, Show, Typeable) - -instance Storable AddrInfo where - sizeOf _ = #const sizeof(struct addrinfo) - alignment _ = alignment (undefined :: CInt) - - peek p = do - ai_flags <- (#peek struct addrinfo, ai_flags) p - ai_family <- (#peek struct addrinfo, ai_family) p - ai_socktype <- (#peek struct addrinfo, ai_socktype) p - ai_protocol <- (#peek struct addrinfo, ai_protocol) p - ai_addr <- (#peek struct addrinfo, ai_addr) p >>= peekSockAddr - ai_canonname_ptr <- (#peek struct addrinfo, ai_canonname) p - - ai_canonname <- if ai_canonname_ptr == nullPtr - then return Nothing - else liftM Just $ peekCString ai_canonname_ptr - - socktype <- unpackSocketType' "AddrInfo.peek" ai_socktype - return (AddrInfo - { - addrFlags = unpackBits aiFlagMapping ai_flags, - addrFamily = unpackFamily ai_family, - addrSocketType = socktype, - addrProtocol = ai_protocol, - addrAddress = ai_addr, - addrCanonName = ai_canonname - }) - - poke p (AddrInfo flags family socketType protocol _ _) = do - c_stype <- packSocketTypeOrThrow "AddrInfo.poke" socketType - - (#poke struct addrinfo, ai_flags) p (packBits aiFlagMapping flags) - (#poke struct addrinfo, ai_family) p (packFamily family) - (#poke struct addrinfo, ai_socktype) p c_stype - (#poke struct addrinfo, ai_protocol) p protocol - - -- stuff below is probably not needed, but let's zero it for safety - - (#poke struct addrinfo, ai_addrlen) p (0::CSize) - (#poke struct addrinfo, ai_addr) p nullPtr - (#poke struct addrinfo, ai_canonname) p nullPtr - (#poke struct addrinfo, ai_next) p nullPtr - --- | Flags that control the querying behaviour of 'getNameInfo'. --- For more information, see -data NameInfoFlag = - -- | Resolve a datagram-based service name. This is - -- required only for the few protocols that have different port - -- numbers for their datagram-based versions than for their - -- stream-based versions. - NI_DGRAM - -- | If the hostname cannot be looked up, an IO error is thrown. - | NI_NAMEREQD - -- | If a host is local, return only the hostname part of the FQDN. - | NI_NOFQDN - -- | The name of the host is not looked up. - -- Instead, a numeric representation of the host's - -- address is returned. For an IPv4 address, this will be a - -- dotted-quad string. For IPv6, it will be colon-separated - -- hexadecimal. - | NI_NUMERICHOST - -- | The name of the service is not - -- looked up. Instead, a numeric representation of the - -- service is returned. - | NI_NUMERICSERV - deriving (Eq, Read, Show, Typeable) - -niFlagMapping :: [(NameInfoFlag, CInt)] - -niFlagMapping = [(NI_DGRAM, #const NI_DGRAM), - (NI_NAMEREQD, #const NI_NAMEREQD), - (NI_NOFQDN, #const NI_NOFQDN), - (NI_NUMERICHOST, #const NI_NUMERICHOST), - (NI_NUMERICSERV, #const NI_NUMERICSERV)] - --- | Default hints for address lookup with 'getAddrInfo'. The values --- of the 'addrAddress' and 'addrCanonName' fields are 'undefined', --- and are never inspected by 'getAddrInfo'. --- --- >>> addrFlags defaultHints --- [] --- >>> addrFamily defaultHints --- AF_UNSPEC --- >>> addrSocketType defaultHints --- NoSocketType --- >>> addrProtocol defaultHints --- 0 - -defaultHints :: AddrInfo -defaultHints = AddrInfo { - addrFlags = [], - addrFamily = AF_UNSPEC, - addrSocketType = NoSocketType, - addrProtocol = defaultProtocol, - addrAddress = undefined, - addrCanonName = undefined - } - --- | Shows the fields of 'defaultHints', without inspecting the by-default undefined fields 'addrAddress' and 'addrCanonName'. -showDefaultHints :: AddrInfo -> String -showDefaultHints AddrInfo{..} = concat - [ "AddrInfo {" - , "addrFlags = " - , show addrFlags - , ", addrFamily = " - , show addrFamily - , ", addrSocketType = " - , show addrSocketType - , ", addrProtocol = " - , show addrProtocol - , ", addrAddress = " - , "" - , ", addrCanonName = " - , "" - , "}" - ] - --- | Resolve a host or service name to one or more addresses. --- The 'AddrInfo' values that this function returns contain 'SockAddr' --- values that you can pass directly to 'connect' or --- 'bind'. --- --- This function is protocol independent. It can return both IPv4 and --- IPv6 address information. --- --- The 'AddrInfo' argument specifies the preferred query behaviour, --- socket options, or protocol. You can override these conveniently --- using Haskell's record update syntax on 'defaultHints', for example --- as follows: --- --- >>> let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Stream } --- --- You must provide a 'Just' value for at least one of the 'HostName' --- or 'ServiceName' arguments. 'HostName' can be either a numeric --- network address (dotted quad for IPv4, colon-separated hex for --- IPv6) or a hostname. In the latter case, its addresses will be --- looked up unless 'AI_NUMERICHOST' is specified as a hint. If you --- do not provide a 'HostName' value /and/ do not set 'AI_PASSIVE' as --- a hint, network addresses in the result will contain the address of --- the loopback interface. --- --- If the query fails, this function throws an IO exception instead of --- returning an empty list. Otherwise, it returns a non-empty list --- of 'AddrInfo' values. --- --- There are several reasons why a query might result in several --- values. For example, the queried-for host could be multihomed, or --- the service might be available via several protocols. --- --- Note: the order of arguments is slightly different to that defined --- for @getaddrinfo@ in RFC 2553. The 'AddrInfo' parameter comes first --- to make partial application easier. --- --- >>> addr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "http") --- >>> addrAddress addr --- 127.0.0.1:80 - -getAddrInfo :: Maybe AddrInfo -- ^ preferred socket type or protocol - -> Maybe HostName -- ^ host name to look up - -> Maybe ServiceName -- ^ service name to look up - -> IO [AddrInfo] -- ^ resolved addresses, with "best" first - -getAddrInfo hints node service = withSocketsDo $ - maybeWith withCString node $ \c_node -> - maybeWith withCString service $ \c_service -> - maybeWith with filteredHints $ \c_hints -> - alloca $ \ptr_ptr_addrs -> do - ret <- c_getaddrinfo c_node c_service c_hints ptr_ptr_addrs - case ret of - 0 -> do ptr_addrs <- peek ptr_ptr_addrs - ais <- followAddrInfo ptr_addrs - c_freeaddrinfo ptr_addrs - return ais - _ -> do err <- gai_strerror ret - let message = concat - [ "Network.Socket.getAddrInfo (called with preferred socket type/protocol: " - , maybe (show hints) showDefaultHints hints - , ", host name: " - , show node - , ", service name: " - , show service - , ")" - ] - ioError (ioeSetErrorString - (mkIOError NoSuchThing message Nothing - Nothing) err) - -- Leaving out the service and using AI_NUMERICSERV causes a - -- segfault on OS X 10.8.2. This code removes AI_NUMERICSERV - -- (which has no effect) in that case. - where -#if defined(darwin_HOST_OS) - filteredHints = case service of - Nothing -> fmap (\ h -> h { addrFlags = delete AI_NUMERICSERV (addrFlags h) }) hints - _ -> hints -#else - filteredHints = hints -#endif - -followAddrInfo :: Ptr AddrInfo -> IO [AddrInfo] - -followAddrInfo ptr_ai | ptr_ai == nullPtr = return [] - | otherwise = do - a <- peek ptr_ai - as <- (#peek struct addrinfo, ai_next) ptr_ai >>= followAddrInfo - return (a:as) - -foreign import ccall safe "hsnet_getaddrinfo" - c_getaddrinfo :: CString -> CString -> Ptr AddrInfo -> Ptr (Ptr AddrInfo) - -> IO CInt - -foreign import ccall safe "hsnet_freeaddrinfo" - c_freeaddrinfo :: Ptr AddrInfo -> IO () - -gai_strerror :: CInt -> IO String - -#ifdef HAVE_GAI_STRERROR -gai_strerror n = c_gai_strerror n >>= peekCString - -foreign import ccall safe "gai_strerror" - c_gai_strerror :: CInt -> IO CString -#else -gai_strerror n = ioError $ userError $ "Network.Socket.gai_strerror not supported: " ++ show n -#endif - -withCStringIf :: Bool -> Int -> (CSize -> CString -> IO a) -> IO a -withCStringIf False _ f = f 0 nullPtr -withCStringIf True n f = allocaBytes n (f (fromIntegral n)) - --- | Resolve an address to a host or service name. --- This function is protocol independent. --- The list of 'NameInfoFlag' values controls query behaviour. --- --- If a host or service's name cannot be looked up, then the numeric --- form of the address or service will be returned. --- --- If the query fails, this function throws an IO exception. --- --- Example: --- @ --- (hostName, _) <- getNameInfo [] True False myAddress --- @ - -getNameInfo :: [NameInfoFlag] -- ^ flags to control lookup behaviour - -> Bool -- ^ whether to look up a hostname - -> Bool -- ^ whether to look up a service name - -> SockAddr -- ^ the address to look up - -> IO (Maybe HostName, Maybe ServiceName) - -getNameInfo flags doHost doService addr = withSocketsDo $ - withCStringIf doHost (#const NI_MAXHOST) $ \c_hostlen c_host -> - withCStringIf doService (#const NI_MAXSERV) $ \c_servlen c_serv -> do - withSockAddr addr $ \ptr_addr sz -> do - ret <- c_getnameinfo ptr_addr (fromIntegral sz) c_host c_hostlen - c_serv c_servlen (packBits niFlagMapping flags) - case ret of - 0 -> do - let peekIf doIf c_val = if doIf - then liftM Just $ peekCString c_val - else return Nothing - host <- peekIf doHost c_host - serv <- peekIf doService c_serv - return (host, serv) - _ -> do err <- gai_strerror ret - let message = concat - [ "Network.Socket.getNameInfo (called with flags: " - , show flags - , ", hostname lookup: " - , show doHost - , ", service name lookup: " - , show doService - , ", socket address: " - , show addr - , ")" - ] - ioError (ioeSetErrorString - (mkIOError NoSuchThing message Nothing - Nothing) err) - -foreign import ccall safe "hsnet_getnameinfo" - c_getnameinfo :: Ptr SockAddr -> CInt{-CSockLen???-} -> CString -> CSize -> CString - -> CSize -> CInt -> IO CInt -#endif - -mkInvalidRecvArgError :: String -> IOError -mkInvalidRecvArgError loc = ioeSetErrorString (mkIOError - InvalidArgument - loc Nothing Nothing) "non-positive length" - -mkEOFError :: String -> IOError -mkEOFError loc = ioeSetErrorString (mkIOError EOF loc Nothing Nothing) "end of file" - --- --------------------------------------------------------------------------- --- foreign imports from the C library - -foreign import ccall unsafe "hsnet_inet_ntoa" - c_inet_ntoa :: HostAddress -> IO (Ptr CChar) - -foreign import CALLCONV unsafe "inet_addr" - c_inet_addr :: Ptr CChar -> IO HostAddress - -foreign import CALLCONV unsafe "shutdown" - c_shutdown :: CInt -> CInt -> IO CInt - -closeFd :: CInt -> IO () -closeFd fd = throwSocketErrorIfMinus1_ "Network.Socket.close" $ c_close fd - -#if !defined(WITH_WINSOCK) -foreign import ccall unsafe "close" - c_close :: CInt -> IO CInt -#else -foreign import stdcall unsafe "closesocket" - c_close :: CInt -> IO CInt -#endif - -foreign import CALLCONV unsafe "socket" - c_socket :: CInt -> CInt -> CInt -> IO CInt -foreign import CALLCONV unsafe "bind" - c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt -foreign import CALLCONV SAFE_ON_WIN "connect" - c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt -#ifdef HAVE_ACCEPT4 -foreign import CALLCONV unsafe "accept4" - c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt -#else -foreign import CALLCONV unsafe "accept" - c_accept :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> IO CInt -#endif -foreign import CALLCONV unsafe "listen" - c_listen :: CInt -> CInt -> IO CInt - -#if defined(mingw32_HOST_OS) -foreign import CALLCONV safe "accept" - c_accept_safe :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> IO CInt - -foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool -#endif - -foreign import CALLCONV unsafe "send" - c_send :: CInt -> Ptr a -> CSize -> CInt -> IO CInt -foreign import CALLCONV SAFE_ON_WIN "sendto" - c_sendto :: CInt -> Ptr a -> CSize -> CInt -> Ptr SockAddr -> CInt -> IO CInt -foreign import CALLCONV unsafe "recv" - c_recv :: CInt -> Ptr CChar -> CSize -> CInt -> IO CInt -foreign import CALLCONV SAFE_ON_WIN "recvfrom" - c_recvfrom :: CInt -> Ptr a -> CSize -> CInt -> Ptr SockAddr -> Ptr CInt -> IO CInt -foreign import CALLCONV unsafe "getpeername" - c_getpeername :: CInt -> Ptr SockAddr -> Ptr CInt -> IO CInt -foreign import CALLCONV unsafe "getsockname" - c_getsockname :: CInt -> Ptr SockAddr -> Ptr CInt -> IO CInt - -foreign import CALLCONV unsafe "getsockopt" - c_getsockopt :: CInt -> CInt -> CInt -> Ptr CInt -> Ptr CInt -> IO CInt -foreign import CALLCONV unsafe "setsockopt" - c_setsockopt :: CInt -> CInt -> CInt -> Ptr CInt -> CInt -> IO CInt - -#if defined(HAVE_GETPEEREID) -foreign import CALLCONV unsafe "getpeereid" - c_getpeereid :: CInt -> Ptr CUInt -> Ptr CUInt -> IO CInt -#endif --- --------------------------------------------------------------------------- --- * Deprecated aliases - --- $deprecated-aliases --- --- These aliases are deprecated and should not be used in new code. --- They will be removed in some future version of the package. - -{-# DEPRECATED bindSocket "use 'bind'" #-} - --- | Deprecated alias for 'bind'. -bindSocket :: Socket -- Unconnected Socket - -> SockAddr -- Address to Bind to - -> IO () -bindSocket = bind - -{-# DEPRECATED sClose "use 'close'" #-} - --- | Deprecated alias for 'close'. -sClose :: Socket -> IO () -sClose = close - -{-# DEPRECATED sIsConnected "SocketStatus will be removed" #-} - -sIsConnected :: Socket -> IO Bool -sIsConnected = isConnected - -{-# DEPRECATED sIsBound "SocketStatus will be removed" #-} - -sIsBound :: Socket -> IO Bool -sIsBound = isBound - -{-# DEPRECATED sIsListening "SocketStatus will be removed" #-} - -sIsListening :: Socket -> IO Bool -sIsListening = isListening - -{-# DEPRECATED sIsReadable "SocketStatus will be removed" #-} - -sIsReadable :: Socket -> IO Bool -sIsReadable = isReadable - -{-# DEPRECATED sIsWritable "SocketStatus will be removed" #-} - -sIsWritable :: Socket -> IO Bool -sIsWritable = isWritable - -#if defined(HAVE_IF_NAMETOINDEX) --- | Returns the index corresponding to the interface name. --- --- Since 2.7.0.0. -ifNameToIndex :: String -> IO (Maybe Int) -ifNameToIndex ifname = do - index <- withCString ifname c_if_nametoindex - -- On failure zero is returned. We'll return Nothing. - return $ if index == 0 then Nothing else Just $ fromIntegral index - --- | Returns the interface name corresponding to the index. --- --- Since 2.7.0.0. -ifIndexToName :: Int -> IO (Maybe String) -ifIndexToName ifn = allocaBytes 16 $ \ptr -> do -- 16 == IFNAMSIZ - r <- c_if_indextoname (fromIntegral ifn) ptr - if r == nullPtr then - return Nothing - else - Just <$> peekCString ptr - -foreign import CALLCONV safe "if_nametoindex" - c_if_nametoindex :: CString -> IO CUInt - -foreign import CALLCONV safe "if_indextoname" - c_if_indextoname :: CUInt -> CString -> IO CString -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/network.buildinfo.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/network.buildinfo.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/network.buildinfo.in 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/network.buildinfo.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -ghc-options: @EXTRA_CPPFLAGS@ -ghc-prof-options: @EXTRA_CPPFLAGS@ -ld-options: @LDFLAGS@ -cc-options: @EXTRA_CPPFLAGS@ -c-sources: @EXTRA_SRCS@ -extra-libraries: @EXTRA_LIBS@ -install-includes: HsNetworkConfig.h diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/network.cabal cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/network.cabal --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/network.cabal 2018-10-17 15:56:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/network.cabal 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -name: network -version: 2.7.0.2 -x-revision: 2 -license: BSD3 -license-file: LICENSE -maintainer: Kazu Yamamoto, Evan Borden -synopsis: Low-level networking interface -description: - This package provides a low-level networking interface. - . - In network-2.6 the @Network.URI@ module was split off into its own - package, network-uri-2.6. If you're using the @Network.URI@ module - you can automatically get it from the right package by adding this - to your .cabal file: - . - > library - > build-depends: network-uri-flag -category: Network -build-type: Configure -cabal-version: >=1.8 -extra-tmp-files: - config.log config.status autom4te.cache network.buildinfo - include/HsNetworkConfig.h -extra-source-files: - README.md CHANGELOG.md - examples/*.hs tests/*.hs config.guess config.sub install-sh - configure.ac configure network.buildinfo.in - include/HsNetworkConfig.h.in include/HsNet.h include/HsNetDef.h - -- C sources only used on some systems - cbits/ancilData.c cbits/asyncAccept.c cbits/initWinSock.c - cbits/winSockErr.c -homepage: https://github.com/haskell/network -bug-reports: https://github.com/haskell/network/issues -tested-with: GHC == 7.4.2 - , GHC == 7.6.3 - , GHC == 7.8.4 - , GHC == 7.10.3 - , GHC == 8.0.2 - , GHC == 8.2.2 - -library - exposed-modules: - Network - Network.BSD - Network.Socket - Network.Socket.ByteString - Network.Socket.ByteString.Lazy - Network.Socket.Internal - other-modules: - Network.Socket.ByteString.Internal - Network.Socket.Types - - if !os(windows) - other-modules: - Network.Socket.ByteString.IOVec - Network.Socket.ByteString.Lazy.Posix - Network.Socket.ByteString.MsgHdr - if os(windows) - other-modules: - Network.Socket.ByteString.Lazy.Windows - - build-depends: - base >= 4.7 && < 5, - bytestring == 0.10.* - - if !os(windows) - build-depends: - unix >= 2 - - extensions: - CPP, DeriveDataTypeable, ForeignFunctionInterface, TypeSynonymInstances - include-dirs: include - includes: HsNet.h HsNetDef.h - install-includes: HsNet.h HsNetDef.h - c-sources: cbits/HsNet.c - ghc-options: -Wall -fwarn-tabs - -test-suite spec - hs-source-dirs: tests - main-is: Spec.hs - other-modules: RegressionSpec - SimpleSpec - type: exitcode-stdio-1.0 - ghc-options: -Wall -threaded - build-depends: - base < 5, - bytestring, - directory, - HUnit, - network, - hspec - -test-suite doctest - hs-source-dirs: tests - main-is: doctests.hs - type: exitcode-stdio-1.0 - - build-depends: - base < 5, - doctest >= 0.10.1 - - ghc-options: -Wall - -source-repository head - type: git - location: git://github.com/haskell/network.git diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Network.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Network.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,480 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -{-# OPTIONS_HADDOCK hide #-} ------------------------------------------------------------------------------ --- | --- Module : Network --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/network/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- This module is kept for backwards-compatibility. New users are --- encouraged to use "Network.Socket" instead. --- --- "Network" was intended as a \"higher-level\" interface to networking --- facilities, and only supports TCP. --- ------------------------------------------------------------------------------ - -#include "HsNetworkConfig.h" - -#ifdef HAVE_GETADDRINFO --- Use IPv6-capable function definitions if the OS supports it. -#define IPV6_SOCKET_SUPPORT 1 -#endif - -module Network {-# DEPRECATED "The high level Network interface is no longer supported. Please use Network.Socket." #-} - ( - -- * Basic data types - Socket - , PortID(..) - , HostName - , PortNumber - - -- * Initialisation - , withSocketsDo - - -- * Server-side connections - , listenOn - , accept - , sClose - - -- * Client-side connections - , connectTo - - -- * Simple sending and receiving - {-$sendrecv-} - , sendTo - , recvFrom - - -- * Miscellaneous - , socketPort - - -- * Networking Issues - -- ** Buffering - {-$buffering-} - - -- ** Improving I\/O Performance over sockets - {-$performance-} - ) where - -import Control.Monad (liftM) -import Data.Maybe (fromJust) -import Network.BSD -import Network.Socket hiding (accept, socketPort, recvFrom, - sendTo, PortNumber, sClose) -import qualified Network.Socket as Socket (accept) -import System.IO -import Prelude -import qualified Control.Exception as Exception - --- --------------------------------------------------------------------------- --- High Level ``Setup'' functions - --- If the @PortID@ specifies a unix family socket and the @Hostname@ --- differs from that returned by @getHostname@ then an error is --- raised. Alternatively an empty string may be given to @connectTo@ --- signalling that the current hostname applies. - -data PortID = - Service String -- Service Name eg "ftp" - | PortNumber PortNumber -- User defined Port Number -#if !defined(mingw32_HOST_OS) - | UnixSocket String -- Unix family socket in file system -#endif - deriving (Show, Eq) - --- | Calling 'connectTo' creates a client side socket which is --- connected to the given host and port. The Protocol and socket type is --- derived from the given port identifier. If a port number is given --- then the result is always an internet family 'Stream' socket. - -connectTo :: HostName -- Hostname - -> PortID -- Port Identifier - -> IO Handle -- Connected Socket - -#if defined(IPV6_SOCKET_SUPPORT) --- IPv6 and IPv4. - -connectTo hostname (Service serv) = connect' "Network.connectTo" hostname serv - -connectTo hostname (PortNumber port) = connect' "Network.connectTo" hostname (show port) -#else --- IPv4 only. - -connectTo hostname (Service serv) = do - proto <- getProtocolNumber "tcp" - bracketOnError - (socket AF_INET Stream proto) - (sClose) -- only done if there's an error - (\sock -> do - port <- getServicePortNumber serv - he <- getHostByName hostname - connect sock (SockAddrInet port (hostAddress he)) - socketToHandle sock ReadWriteMode - ) - -connectTo hostname (PortNumber port) = do - proto <- getProtocolNumber "tcp" - bracketOnError - (socket AF_INET Stream proto) - (sClose) -- only done if there's an error - (\sock -> do - he <- getHostByName hostname - connect sock (SockAddrInet port (hostAddress he)) - socketToHandle sock ReadWriteMode - ) -#endif - -#if !defined(mingw32_HOST_OS) -connectTo _ (UnixSocket path) = do - bracketOnError - (socket AF_UNIX Stream 0) - (sClose) - (\sock -> do - connect sock (SockAddrUnix path) - socketToHandle sock ReadWriteMode - ) -#endif - -#if defined(IPV6_SOCKET_SUPPORT) -connect' :: String -> HostName -> ServiceName -> IO Handle - -connect' caller host serv = do - proto <- getProtocolNumber "tcp" - let hints = defaultHints { addrFlags = [AI_ADDRCONFIG] - , addrProtocol = proto - , addrSocketType = Stream } - addrs <- getAddrInfo (Just hints) (Just host) (Just serv) - firstSuccessful caller $ map tryToConnect addrs - where - tryToConnect addr = - bracketOnError - (socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)) - (sClose) -- only done if there's an error - (\sock -> do - connect sock (addrAddress addr) - socketToHandle sock ReadWriteMode - ) -#endif - --- | Creates the server side socket which has been bound to the --- specified port. --- --- 'maxListenQueue' (typically 128) is specified to the listen queue. --- This is good enough for normal network servers but is too small --- for high performance servers. --- --- To avoid the \"Address already in use\" problems, --- the 'ReuseAddr' socket option is set on the listening socket. --- --- If available, the 'IPv6Only' socket option is set to 0 --- so that both IPv4 and IPv6 can be accepted with this socket. --- --- If you don't like the behavior above, please use the lower level --- 'Network.Socket.listen' instead. - -listenOn :: PortID -- ^ Port Identifier - -> IO Socket -- ^ Listening Socket - -#if defined(IPV6_SOCKET_SUPPORT) --- IPv6 and IPv4. - -listenOn (Service serv) = listen' serv - -listenOn (PortNumber port) = listen' (show port) -#else --- IPv4 only. - -listenOn (Service serv) = do - proto <- getProtocolNumber "tcp" - bracketOnError - (socket AF_INET Stream proto) - (sClose) - (\sock -> do - port <- getServicePortNumber serv - setSocketOption sock ReuseAddr 1 - bind sock (SockAddrInet port iNADDR_ANY) - listen sock maxListenQueue - return sock - ) - -listenOn (PortNumber port) = do - proto <- getProtocolNumber "tcp" - bracketOnError - (socket AF_INET Stream proto) - (sClose) - (\sock -> do - setSocketOption sock ReuseAddr 1 - bind sock (SockAddrInet port iNADDR_ANY) - listen sock maxListenQueue - return sock - ) -#endif - -#if !defined(mingw32_HOST_OS) -listenOn (UnixSocket path) = - bracketOnError - (socket AF_UNIX Stream 0) - (sClose) - (\sock -> do - setSocketOption sock ReuseAddr 1 - bind sock (SockAddrUnix path) - listen sock maxListenQueue - return sock - ) -#endif - -#if defined(IPV6_SOCKET_SUPPORT) -listen' :: ServiceName -> IO Socket - -listen' serv = do - proto <- getProtocolNumber "tcp" - -- We should probably specify addrFamily = AF_INET6 and the filter - -- code below should be removed. AI_ADDRCONFIG is probably not - -- necessary. But this code is well-tested. So, let's keep it. - let hints = defaultHints { addrFlags = [AI_ADDRCONFIG, AI_PASSIVE] - , addrSocketType = Stream - , addrProtocol = proto } - addrs <- getAddrInfo (Just hints) Nothing (Just serv) - -- Choose an IPv6 socket if exists. This ensures the socket can - -- handle both IPv4 and IPv6 if v6only is false. - let addrs' = filter (\x -> addrFamily x == AF_INET6) addrs - addr = if null addrs' then head addrs else head addrs' - bracketOnError - (socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)) - (sClose) - (\sock -> do - setSocketOption sock ReuseAddr 1 - bind sock (addrAddress addr) - listen sock maxListenQueue - return sock - ) -#endif - --- ----------------------------------------------------------------------------- --- accept - --- | Accept a connection on a socket created by 'listenOn'. Normal --- I\/O operations (see "System.IO") can be used on the 'Handle' --- returned to communicate with the client. --- Notice that although you can pass any Socket to Network.accept, --- only sockets of either AF_UNIX, AF_INET, or AF_INET6 will work --- (this shouldn't be a problem, though). When using AF_UNIX, HostName --- will be set to the path of the socket and PortNumber to -1. --- -accept :: Socket -- ^ Listening Socket - -> IO (Handle, - HostName, - PortNumber) -- ^ Triple of: read\/write 'Handle' for - -- communicating with the client, - -- the 'HostName' of the peer socket, and - -- the 'PortNumber' of the remote connection. -accept sock@(MkSocket _ AF_INET _ _ _) = do - ~(sock', (SockAddrInet port haddr)) <- Socket.accept sock - peer <- catchIO - (do - (HostEntry peer _ _ _) <- getHostByAddr AF_INET haddr - return peer - ) - (\_e -> inet_ntoa haddr) - -- if getHostByName fails, we fall back to the IP address - handle <- socketToHandle sock' ReadWriteMode - return (handle, peer, port) -#if defined(IPV6_SOCKET_SUPPORT) -accept sock@(MkSocket _ AF_INET6 _ _ _) = do - (sock', addr) <- Socket.accept sock - peer <- catchIO ((fromJust . fst) `liftM` getNameInfo [] True False addr) $ - \_ -> case addr of - SockAddrInet _ a -> inet_ntoa a - SockAddrInet6 _ _ a _ -> return (show a) -#if defined(mingw32_HOST_OS) - SockAddrUnix {} -> ioError $ userError "Network.accept: peer socket address 'SockAddrUnix' not supported on this platform." -#else - SockAddrUnix a -> return a -#endif -#if defined(CAN_SOCKET_SUPPORT) - SockAddrCan {} -> ioError $ userError "Network.accept: peer socket address 'SockAddrCan' not supported." -#else - SockAddrCan {} -> ioError $ userError "Network.accept: peer socket address 'SockAddrCan' not supported on this platform." -#endif - handle <- socketToHandle sock' ReadWriteMode - let port = case addr of - SockAddrInet p _ -> p - SockAddrInet6 p _ _ _ -> p - _ -> -1 - return (handle, peer, port) -#endif -#if !defined(mingw32_HOST_OS) -accept sock@(MkSocket _ AF_UNIX _ _ _) = do - ~(sock', (SockAddrUnix path)) <- Socket.accept sock - handle <- socketToHandle sock' ReadWriteMode - return (handle, path, -1) -#endif -accept (MkSocket _ family _ _ _) = - ioError $ userError $ "Network.accept: address family '" ++ - show family ++ "' not supported." - - --- | Close the socket. Sending data to or receiving data from closed socket --- may lead to undefined behaviour. -sClose :: Socket -> IO () -sClose = close -- Explicit redefinition because Network.sClose is deprecated, - -- hence the re-export would also be marked as such. - --- ----------------------------------------------------------------------------- --- sendTo/recvFrom - -{-$sendrecv -Send and receive data from\/to the given host and port number. These -should normally only be used where the socket will not be required for -further calls. Also, note that due to the use of 'hGetContents' in 'recvFrom' -the socket will remain open (i.e. not available) even if the function already -returned. Their use is strongly discouraged except for small test-applications -or invocations from the command line. --} - -sendTo :: HostName -- Hostname - -> PortID -- Port Number - -> String -- Message to send - -> IO () -sendTo h p msg = do - s <- connectTo h p - hPutStr s msg - hClose s - -recvFrom :: HostName -- Hostname - -> PortID -- Port Number - -> IO String -- Received Data - -#if defined(IPV6_SOCKET_SUPPORT) -recvFrom host port = do - proto <- getProtocolNumber "tcp" - let hints = defaultHints { addrFlags = [AI_ADDRCONFIG] - , addrProtocol = proto - , addrSocketType = Stream } - allowed <- map addrAddress `liftM` getAddrInfo (Just hints) (Just host) - Nothing - s <- listenOn port - let waiting = do - (s', addr) <- Socket.accept s - if not (addr `oneOf` allowed) - then sClose s' >> waiting - else socketToHandle s' ReadMode >>= hGetContents - waiting - where - a@(SockAddrInet _ ha) `oneOf` ((SockAddrInet _ hb):bs) - | ha == hb = True - | otherwise = a `oneOf` bs - a@(SockAddrInet6 _ _ ha _) `oneOf` ((SockAddrInet6 _ _ hb _):bs) - | ha == hb = True - | otherwise = a `oneOf` bs - _ `oneOf` _ = False -#else -recvFrom host port = do - ip <- getHostByName host - let ipHs = hostAddresses ip - s <- listenOn port - let - waiting = do - ~(s', SockAddrInet _ haddr) <- Socket.accept s - he <- getHostByAddr AF_INET haddr - if not (any (`elem` ipHs) (hostAddresses he)) - then do - sClose s' - waiting - else do - h <- socketToHandle s' ReadMode - msg <- hGetContents h - return msg - - message <- waiting - return message -#endif - --- --------------------------------------------------------------------------- --- Access function returning the port type/id of socket. - --- | Returns the 'PortID' associated with a given socket. -socketPort :: Socket -> IO PortID -socketPort s = do - sockaddr <- getSocketName s - case sockaddr of - SockAddrInet port _ -> return $ PortNumber port -#if defined(IPV6_SOCKET_SUPPORT) - SockAddrInet6 port _ _ _ -> return $ PortNumber port -#else - SockAddrInet6 {} -> ioError $ userError "Network.socketPort: socket address 'SockAddrInet6' not supported on this platform." -#endif -#if defined(mingw32_HOST_OS) - SockAddrUnix {} -> ioError $ userError "Network.socketPort: socket address 'SockAddrUnix' not supported on this platform." -#else - SockAddrUnix path -> return $ UnixSocket path -#endif - SockAddrCan {} -> ioError $ userError "Network.socketPort: socket address 'SockAddrCan' not supported." - --- --------------------------------------------------------------------------- --- Utils - --- Like bracket, but only performs the final action if there was an --- exception raised by the middle bit. -bracketOnError - :: IO a -- ^ computation to run first (\"acquire resource\") - -> (a -> IO b) -- ^ computation to run last (\"release resource\") - -> (a -> IO c) -- ^ computation to run in-between - -> IO c -- returns the value from the in-between computation -bracketOnError = Exception.bracketOnError - ------------------------------------------------------------------------------ --- Extra documentation - -{-$buffering - -The 'Handle' returned by 'connectTo' and 'accept' is 'NoBuffering' by -default. For an interactive application you may want to set the -buffering mode on the 'Handle' to -'LineBuffering' or 'BlockBuffering', like so: - -> h <- connectTo host port -> hSetBuffering h LineBuffering --} - -{-$performance - -For really fast I\/O, it might be worth looking at the 'hGetBuf' and -'hPutBuf' family of functions in "System.IO". --} - -catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a -#if MIN_VERSION_base(4,0,0) -catchIO = Exception.catch -#else -catchIO = Exception.catchJust Exception.ioErrors -#endif - --- Version of try implemented in terms of the locally defined catchIO -tryIO :: IO a -> IO (Either Exception.IOException a) -tryIO m = catchIO (liftM Right m) (return . Left) - --- Returns the first action from a list which does not throw an exception. --- If all the actions throw exceptions (and the list of actions is not empty), --- the last exception is thrown. --- The operations are run outside of the catchIO cleanup handler because --- catchIO masks asynchronous exceptions in the cleanup handler. --- In the case of complete failure, the last exception is actually thrown. -firstSuccessful :: String -> [IO a] -> IO a -firstSuccessful caller = go Nothing - where - -- Attempt the next operation, remember exception on failure - go _ (p:ps) = - do r <- tryIO p - case r of - Right x -> return x - Left e -> go (Just e) ps - - -- All operations failed, throw error if one exists - go Nothing [] = ioError $ userError $ caller ++ ": firstSuccessful: empty list" - go (Just e) [] = Exception.throwIO e diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/README.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/README.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/README.md 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/README.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -# [`network`](http://hackage.haskell.org/package/network) [![Build Status](https://travis-ci.org/haskell/network.svg?branch=master)](https://travis-ci.org/haskell/network) [![Build status](https://ci.appveyor.com/api/projects/status/5erq63o4m29bhl57/branch/master?svg=true)](https://ci.appveyor.com/project/eborden/network/branch/master) - -To build this package using Cabal directly from git, you must run -`autoreconf` before the usual Cabal build steps -(configure/build/install). `autoreconf` is included in the -[GNU Autoconf](http://www.gnu.org/software/autoconf/) tools. There is -no need to run the `configure` script: the `setup configure` step will -do this for you. - -## Support Policy - -### GHC - -`network`'s GHC policy supports 3 [stable](https://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/intro.html#ghc-version-numbering-policy) versions. The current stable -version and two previous stable versions are supported. - -### Hugs, JHC, UHC - -`network` does not officially support these compilers. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Setup.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Setup.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/Setup.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/Setup.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -module Main (main) where - -import Distribution.Simple - -main :: IO () -main = defaultMainWithHooks autoconfUserHooks diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/BadFileDescriptor.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/BadFileDescriptor.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/BadFileDescriptor.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/BadFileDescriptor.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ --- Test code for "threadWait: invalid argument (Bad file descriptor)" --- See https://ghc.haskell.org/trac/ghc/ticket/14621 --- See https://github.com/haskell/network/issues/287 --- --- % runghc BadFileDescriptor.hs --- BadFileDescriptor.hs: threadWait: invalid argument (Bad file descriptor) -module Main where - -import Control.Concurrent (forkIO) -import Control.Monad (void, forever) -import Network.Socket hiding (recv) -import Network.Socket.ByteString (recv, sendAll) - -main :: IO () -main = do - let localhost = "localhost" - listenPort = "9876" - connectPort = "6789" - proxy localhost listenPort connectPort - -proxy :: HostName -> ServiceName -> ServiceName -> IO () -proxy localhost listenPort connectPort = do - fromClient <- serverSocket localhost listenPort - toServer <- clientSocket localhost connectPort - void $ forkIO $ relay toServer fromClient - relay fromClient toServer - -relay :: Socket -> Socket -> IO () -relay s1 s2 = forever $ do - payload <- recv s1 4096 - sendAll s2 payload - -serverSocket :: HostName -> ServiceName -> IO Socket -serverSocket host port = do - let hints = defaultHints { - addrFlags = [AI_PASSIVE] - , addrSocketType = Stream - } - addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - bind sock (addrAddress addr) - listen sock 1 - fst <$> accept sock - -clientSocket :: HostName -> ServiceName -> IO Socket -clientSocket host port = do - let hints = defaultHints { addrSocketType = Stream } - addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - connect sock (addrAddress addr) - return sock diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/doctests.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/doctests.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/doctests.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/doctests.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -import Test.DocTest - -main :: IO () -main = doctest [ - "-i" - , "-idist/build" - , "-i." - , "-idist/build/autogen" - , "-Idist/build/autogen" - , "-Idist/build" - , "-Iinclude" - , "-optP-include" - , "-optPdist/build/autogen/cabal_macros.h" - , "-DCALLCONV=ccall" - , "-XCPP" - , "-XDeriveDataTypeable" - , "-package-db dist/package.conf.inplace" - , "-package network" - , "Network" - ] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/RegressionSpec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/RegressionSpec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/RegressionSpec.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/RegressionSpec.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} --- | Tests for things that didn't work in the past. -module RegressionSpec (main, spec) where - -import Control.Monad -import Network.Socket hiding (send, sendTo, recv, recvFrom) -import Network.Socket.ByteString - -import Test.Hspec - -main :: IO () -main = hspec spec - -spec :: Spec -spec = do - describe "getAddrInfo" $ do - it "does not cause segfault on macOS 10.8.2 due to AI_NUMERICSERV" $ do - let hints = defaultHints { addrFlags = [AI_NUMERICSERV] } - void $ getAddrInfo (Just hints) (Just "localhost") Nothing - - describe "Network.Socket.ByteString.recv" $ do - it "checks -1 correctly on Windows" $ do - sock <- socket AF_INET Stream defaultProtocol - recv sock 1024 `shouldThrow` anyException - - describe "Network.Socket.ByteString.send" $ do - it "checks -1 correctly on Windows" $ do - sock <- socket AF_INET Stream defaultProtocol - send sock "hello world" `shouldThrow` anyException diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/SimpleSpec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/SimpleSpec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/SimpleSpec.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/SimpleSpec.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,344 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE ScopedTypeVariables #-} - -module SimpleSpec (main, spec) where - -import Control.Concurrent (ThreadId, forkIO, myThreadId) -import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar, readMVar) -import qualified Control.Exception as E -import Control.Monad -import Data.ByteString (ByteString) -import qualified Data.ByteString as S -import qualified Data.ByteString.Char8 as C -import qualified Data.ByteString.Lazy as L -import Network.Socket hiding (send, sendTo, recv, recvFrom) -import Network.Socket.ByteString -import qualified Network.Socket.ByteString.Lazy as Lazy -import System.Directory -import System.Timeout (timeout) - -import Test.Hspec - -main :: IO () -main = hspec spec - -spec :: Spec -spec = do - describe "send" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` testMsg - client sock = send sock testMsg - tcpTest client server - - describe "sendAll" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` testMsg - client sock = sendAll sock testMsg - tcpTest client server - - describe "Lazy.sendAll" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` testMsg - client sock = Lazy.sendAll sock $ L.fromChunks [testMsg] - tcpTest client server - - describe "sendTo" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` testMsg - client sock serverPort = do - let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Datagram } - addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) - sendTo sock testMsg $ addrAddress addr - udpTest client server - - describe "sendAllTo" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` testMsg - client sock serverPort = do - let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Datagram } - addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) - sendAllTo sock testMsg $ addrAddress addr - udpTest client server - - describe "sendMany" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` (S.append seg1 seg2) - client sock = sendMany sock [seg1, seg2] - - seg1 = C.pack "This is a " - seg2 = C.pack "test message." - tcpTest client server - - describe "sendManyTo" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` (S.append seg1 seg2) - client sock serverPort = do - let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Datagram } - addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) - sendManyTo sock [seg1, seg2] $ addrAddress addr - - seg1 = C.pack "This is a " - seg2 = C.pack "test message." - udpTest client server - - describe "recv" $ do - it "works well" $ do - let server sock = recv sock 1024 `shouldReturn` testMsg - client sock = send sock testMsg - tcpTest client server - - it "can treat overflow" $ do - let server sock = do seg1 <- recv sock (S.length testMsg - 3) - seg2 <- recv sock 1024 - let msg = S.append seg1 seg2 - msg `shouldBe` testMsg - client sock = send sock testMsg - tcpTest client server - - it "returns empty string at EOF" $ do - let client s = recv s 4096 `shouldReturn` S.empty - server s = shutdown s ShutdownSend - tcpTest client server - - describe "recvFrom" $ do - it "works well" $ do - let server sock = do (msg, _) <- recvFrom sock 1024 - testMsg `shouldBe` msg - client sock = do - addr <- getPeerName sock - sendTo sock testMsg addr - tcpTest client server - it "can treat overflow" $ do - let server sock = do (seg1, _) <- recvFrom sock (S.length testMsg - 3) - (seg2, _) <- recvFrom sock 1024 - let msg = S.append seg1 seg2 - testMsg `shouldBe` msg - - client sock = send sock testMsg - tcpTest client server - - describe "UserTimeout" $ do - it "can be set" $ do - when (isSupportedSocketOption UserTimeout) $ do - sock <- socket AF_INET Stream defaultProtocol - setSocketOption sock UserTimeout 1000 - getSocketOption sock UserTimeout `shouldReturn` 1000 - setSocketOption sock UserTimeout 2000 - getSocketOption sock UserTimeout `shouldReturn` 2000 - close sock - - -- On various BSD systems the peer credentials are exchanged during - -- connect(), and this does not happen with `socketpair()`. Therefore, - -- we must actually set up a listener and connect, rather than use a - -- socketpair(). - -- - describe "getPeerCredential" $ do - it "can return something" $ do - when isUnixDomainSocketAvailable $ do - -- It would be useful to check that we did not get garbage - -- back, but rather the actual uid of the test program. For - -- that we'd need System.Posix.User, but that is not available - -- under Windows. For now, accept the risk that we did not get - -- the right answer. - -- - let client sock = do - (_, uid, _) <- getPeerCredential sock - uid `shouldNotBe` Nothing - server (sock, _) = do - (_, uid, _) <- getPeerCredential sock - uid `shouldNotBe` Nothing - unixTest client server - {- The below test fails on many *BSD systems, because the getsockopt() - call that underlies getpeereid() does not have the same meaning for - all address families, but the C-library was not checking that the - provided sock is an AF_UNIX socket. This will fixed some day, but - we should not fail on those systems in the mean-time. The upstream - C-library fix is to call getsockname() and check the address family - before calling `getpeereid()`. We could duplicate that in our own - code, and then this test would work on those platforms that have - `getpeereid()` and not the SO_PEERCRED socket option. - - it "return nothing for non-UNIX-domain socket" $ do - when isUnixDomainSocketAvailable $ do - s <- socket AF_INET Stream defaultProtocol - cred1 <- getPeerCredential s - cred1 `shouldBe` (Nothing,Nothing,Nothing) - -} - - describe "getAddrInfo" $ do - it "works for IPv4 address" $ do - let hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_ADDRCONFIG] } - AddrInfo{addrAddress = (SockAddrInet _ hostAddr)}:_ <- - getAddrInfo (Just hints) (Just "127.128.129.130") Nothing - hostAddressToTuple hostAddr `shouldBe` (0x7f, 0x80, 0x81, 0x82) -#if defined(IPV6_SOCKET_SUPPORT) - it "works for IPv6 address" $ do - let hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_ADDRCONFIG] } - host = "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - AddrInfo{addrAddress = (SockAddrInet6 _ _ hostAddr _)}:_ <- - getAddrInfo (Just hints) (Just host) Nothing - hostAddress6ToTuple hostAddr - `shouldBe` (0x2001, 0x0db8, 0x85a3, 0x0000, 0x0000, 0x8a2e, 0x0370, 0x7334) -#endif - ------------------------------------------------------------------------- - -serverAddr :: String -serverAddr = "127.0.0.1" - -testMsg :: ByteString -testMsg = "This is a test message." - -unixAddr :: String -unixAddr = "/tmp/network-test" - ------------------------------------------------------------------------- --- Test helpers - --- | Establish a connection between client and server and then run --- 'clientAct' and 'serverAct', in different threads. Both actions --- get passed a connected 'Socket', used for communicating between --- client and server. 'unixTest' makes sure that the 'Socket' is --- closed after the actions have run. -unixTest :: (Socket -> IO a) -> ((Socket, SockAddr) -> IO b) -> IO () -unixTest clientAct serverAct = do - test clientSetup clientAct serverSetup server - where - clientSetup = do - sock <- socket AF_UNIX Stream defaultProtocol - connect sock (SockAddrUnix unixAddr) - return sock - - serverSetup = do - sock <- socket AF_UNIX Stream defaultProtocol - unlink unixAddr -- just in case - bind sock (SockAddrUnix unixAddr) - listen sock 1 - return sock - - server sock = E.bracket (accept sock) (killClientSock . fst) serverAct - - unlink file = do - exist <- doesFileExist file - when exist $ removeFile file - - killClientSock sock = do - shutdown sock ShutdownBoth - close sock - unlink unixAddr - --- | Establish a connection between client and server and then run --- 'clientAct' and 'serverAct', in different threads. Both actions --- get passed a connected 'Socket', used for communicating between --- client and server. 'tcpTest' makes sure that the 'Socket' is --- closed after the actions have run. -tcpTest :: (Socket -> IO a) -> (Socket -> IO b) -> IO () -tcpTest clientAct serverAct = do - portVar <- newEmptyMVar - test (clientSetup portVar) clientAct (serverSetup portVar) server - where - clientSetup portVar = do - let hints = defaultHints { addrSocketType = Stream } - serverPort <- readMVar portVar - addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) -#if !defined(mingw32_HOST_OS) - let fd = fdSocket sock - getNonBlock fd `shouldReturn` True - getCloseOnExec fd `shouldReturn` False -#endif - connect sock $ addrAddress addr - return sock - - serverSetup portVar = do - let hints = defaultHints { - addrFlags = [AI_PASSIVE] - , addrSocketType = Stream - } - addr:_ <- getAddrInfo (Just hints) (Just serverAddr) Nothing - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - let fd = fdSocket sock -#if !defined(mingw32_HOST_OS) - getNonBlock fd `shouldReturn` True - getCloseOnExec fd `shouldReturn` False -#endif - setSocketOption sock ReuseAddr 1 - setCloseOnExecIfNeeded fd -#if !defined(mingw32_HOST_OS) - getCloseOnExec fd `shouldReturn` True -#endif - bind sock $ addrAddress addr - listen sock 1 - serverPort <- socketPort sock - putMVar portVar serverPort - return sock - - server sock = do - (clientSock, _) <- accept sock -#if !defined(mingw32_HOST_OS) - let fd = fdSocket clientSock - getNonBlock fd `shouldReturn` True - getCloseOnExec fd `shouldReturn` True -#endif - _ <- serverAct clientSock - close clientSock - --- | Create an unconnected 'Socket' for sending UDP and receiving --- datagrams and then run 'clientAct' and 'serverAct'. -udpTest :: (Socket -> PortNumber -> IO a) -> (Socket -> IO b) -> IO () -udpTest clientAct serverAct = do - portVar <- newEmptyMVar - test clientSetup (client portVar) (serverSetup portVar) serverAct - where - clientSetup = socket AF_INET Datagram defaultProtocol - - client portVar sock = do - serverPort <- readMVar portVar - clientAct sock serverPort - - serverSetup portVar = do - let hints = defaultHints { - addrFlags = [AI_PASSIVE] - , addrSocketType = Datagram - } - addr:_ <- getAddrInfo (Just hints) (Just serverAddr) Nothing - sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - setSocketOption sock ReuseAddr 1 - bind sock $ addrAddress addr - serverPort <- socketPort sock - putMVar portVar serverPort - return sock - --- | Run a client/server pair and synchronize them so that the server --- is started before the client and the specified server action is --- finished before the client closes the 'Socket'. -test :: IO Socket -> (Socket -> IO b) -> IO Socket -> (Socket -> IO c) -> IO () -test clientSetup clientAct serverSetup serverAct = do - tid <- myThreadId - barrier <- newEmptyMVar - _ <- forkIO $ server barrier - client tid barrier - where - server barrier = do - E.bracket serverSetup close $ \sock -> do - serverReady - Just _ <- timeout 1000000 $ serverAct sock - putMVar barrier () - where - -- | Signal to the client that it can proceed. - serverReady = putMVar barrier () - - client tid barrier = do - takeMVar barrier - -- Transfer exceptions to the main thread. - bracketWithReraise tid clientSetup close $ \res -> do - Just _ <- timeout 1000000 $ clientAct res - takeMVar barrier - --- | Like 'bracket' but catches and reraises the exception in another --- thread, specified by the first argument. -bracketWithReraise :: ThreadId -> IO a -> (a -> IO b) -> (a -> IO ()) -> IO () -bracketWithReraise tid setup teardown thing = - E.bracket setup teardown thing - `E.catch` \ (e :: E.SomeException) -> E.throwTo tid e diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/Spec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/Spec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.7.0.2/tests/Spec.hs 2018-07-07 14:47:29.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.7.0.2/tests/Spec.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -{-# OPTIONS_GHC -F -pgmF hspec-discover #-} diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/ancilData.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/ancilData.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/ancilData.c 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/ancilData.c 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,132 @@ +/* + * Copyright(c), 2002 The GHC Team. + */ + +#ifdef aix_HOST_OS +#define _LINUX_SOURCE_COMPAT +// Required to get CMSG_SPACE/CMSG_LEN macros. See #265. +// Alternative is to #define COMPAT_43 and use the +// HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS code instead, but that means +// fiddling with the configure script too. +#endif + +#include "HsNet.h" +#include + +#if HAVE_STRUCT_MSGHDR_MSG_CONTROL || HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS /* until end */ + +/* + * Support for transmitting file descriptors. + * + * + */ + + +/* + * sendmsg() and recvmsg() wrappers for transmitting + * ancillary socket data. + * + * Doesn't provide the full generality of either, specifically: + * + * - no support for scattered read/writes. + * - only possible to send one ancillary chunk of data at a time. + */ + +int +sendFd(int sock, + int outfd) +{ + struct msghdr msg = {0}; + struct iovec iov[1]; + char buf[2]; +#if HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS + msg.msg_accrights = (void*)&outfd; + msg.msg_accrightslen = sizeof(int); +#else + struct cmsghdr *cmsg; + char ancBuffer[CMSG_SPACE(sizeof(int))]; + char* dPtr; + + msg.msg_control = ancBuffer; + msg.msg_controllen = sizeof(ancBuffer); + + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + dPtr = (char*)CMSG_DATA(cmsg); + + *(int*)dPtr = outfd; + msg.msg_controllen = cmsg->cmsg_len; +#endif + + buf[0] = 0; buf[1] = '\0'; + iov[0].iov_base = buf; + iov[0].iov_len = 2; + + msg.msg_iov = iov; + msg.msg_iovlen = 1; + + return sendmsg(sock,&msg,0); +} + +int +recvFd(int sock) +{ + struct msghdr msg = {0}; + char duffBuf[10]; + int rc; + int len = sizeof(int); + struct iovec iov[1]; +#if HAVE_STRUCT_MSGHDR_MSG_CONTROL + struct cmsghdr *cmsg = NULL; + struct cmsghdr *cptr; +#else + int* fdBuffer; +#endif + int fd; + + iov[0].iov_base = duffBuf; + iov[0].iov_len = sizeof(duffBuf); + msg.msg_iov = iov; + msg.msg_iovlen = 1; + +#if HAVE_STRUCT_MSGHDR_MSG_CONTROL + cmsg = (struct cmsghdr*)malloc(CMSG_SPACE(len)); + if (cmsg==NULL) { + return -1; + } + + msg.msg_control = (void *)cmsg; + msg.msg_controllen = CMSG_LEN(len); +#else + fdBuffer = (int*)malloc(len); + if (fdBuffer) { + msg.msg_accrights = (void *)fdBuffer; + } else { + return -1; + } + msg.msg_accrightslen = len; +#endif + + if ((rc = recvmsg(sock,&msg,0)) < 0) { +#if HAVE_STRUCT_MSGHDR_MSG_CONTROL + free(cmsg); +#else + free(fdBuffer); +#endif + return rc; + } + +#if HAVE_STRUCT_MSGHDR_MSG_CONTROL + cptr = (struct cmsghdr*)CMSG_FIRSTHDR(&msg); + fd = *(int*)CMSG_DATA(cptr); + free(cmsg); +#else + fd = *(int*)fdBuffer; + free(fdBuffer); +#endif + return fd; +} + +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/asyncAccept.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/asyncAccept.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/asyncAccept.c 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/asyncAccept.c 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * (c) sof, 2003. + */ + +#include "HsNet.h" +#include "HsFFI.h" + +#if defined(HAVE_WINSOCK2_H) + +/* all the way to the end */ + +/* + * To support non-blocking accept()s with WinSock, we use the asyncDoProc# + * primop, which lets a Haskell thread call an external routine without + * blocking the progress of other threads. + * + * As can readily be seen, this is a low-level mechanism. + * + */ + +typedef struct AcceptData { + int fdSock; + int newSock; + void* sockAddr; + int size; +} AcceptData; + +/* + * Fill in parameter block that's passed along when the RTS invokes the + * accept()-calling proc below (acceptDoProc()) + */ +void* +newAcceptParams(int sock, + int sz, + void* sockaddr) +{ + AcceptData* data = (AcceptData*)malloc(sizeof(AcceptData)); + if (!data) return NULL; + data->fdSock = sock; + data->newSock = 0; + data->sockAddr = sockaddr; + data->size = sz; + + return data; +} + +/* Accessors for return code and accept()'s socket result. */ + +int +acceptNewSock(void* d) +{ + return (((AcceptData*)d)->newSock); +} + +/* Routine invoked by an RTS worker thread */ +int +acceptDoProc(void* param) +{ + SOCKET s; + + AcceptData* data = (AcceptData*)param; + s = accept( data->fdSock, + data->sockAddr, + &data->size); + data->newSock = s; + if ( s == INVALID_SOCKET ) { + return GetLastError(); + } else { + return 0; + } +} +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/HsNet.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/HsNet.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/HsNet.c 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/HsNet.c 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,8 @@ +/* ----------------------------------------------------------------------------- + * (c) The University of Glasgow 2002 + * + * static versions of the inline functions from HsNet.h + * -------------------------------------------------------------------------- */ + +#define INLINE +#include "HsNet.h" diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/initWinSock.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/initWinSock.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/initWinSock.c 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/initWinSock.c 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,43 @@ +#include "HsNet.h" +#include "HsFFI.h" + +#if defined(HAVE_WINSOCK2_H) + +static int winsock_inited = 0; + +static void +shutdownHandler(void) +{ + WSACleanup(); +} + +/* Initialising WinSock... */ +int +initWinSock () +{ + WORD wVersionRequested; + WSADATA wsaData; + int err; + + if (!winsock_inited) { + wVersionRequested = MAKEWORD( 2, 2 ); + + err = WSAStartup ( wVersionRequested, &wsaData ); + + if ( err != 0 ) { + return err; + } + + if ( LOBYTE( wsaData.wVersion ) != 2 || + HIBYTE( wsaData.wVersion ) != 2 ) { + WSACleanup(); + return (-1); + } + + atexit(shutdownHandler); + winsock_inited = 1; + } + return 0; +} + +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/winSockErr.c cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/winSockErr.c --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/cbits/winSockErr.c 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/cbits/winSockErr.c 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,76 @@ +#include "HsNet.h" +#include "HsFFI.h" + +#if defined(HAVE_WINSOCK2_H) +#include + +/* to the end */ + +const char* +getWSErrorDescr(int err) +{ + static char otherErrMsg[256]; + + switch (err) { + case WSAEINTR: return "Interrupted function call (WSAEINTR)"; + case WSAEBADF: return "bad socket descriptor (WSAEBADF)"; + case WSAEACCES: return "Permission denied (WSAEACCESS)"; + case WSAEFAULT: return "Bad address (WSAEFAULT)"; + case WSAEINVAL: return "Invalid argument (WSAEINVAL)"; + case WSAEMFILE: return "Too many open files (WSAEMFILE)"; + case WSAEWOULDBLOCK: return "Resource temporarily unavailable (WSAEWOULDBLOCK)"; + case WSAEINPROGRESS: return "Operation now in progress (WSAEINPROGRESS)"; + case WSAEALREADY: return "Operation already in progress (WSAEALREADY)"; + case WSAENOTSOCK: return "Socket operation on non-socket (WSAENOTSOCK)"; + case WSAEDESTADDRREQ: return "Destination address required (WSAEDESTADDRREQ)"; + case WSAEMSGSIZE: return "Message too long (WSAEMSGSIZE)"; + case WSAEPROTOTYPE: return "Protocol wrong type for socket (WSAEPROTOTYPE)"; + case WSAENOPROTOOPT: return "Bad protocol option (WSAENOPROTOOPT)"; + case WSAEPROTONOSUPPORT: return "Protocol not supported (WSAEPROTONOSUPPORT)"; + case WSAESOCKTNOSUPPORT: return "Socket type not supported (WSAESOCKTNOSUPPORT)"; + case WSAEOPNOTSUPP: return "Operation not supported (WSAEOPNOTSUPP)"; + case WSAEPFNOSUPPORT: return "Protocol family not supported (WSAEPFNOSUPPORT)"; + case WSAEAFNOSUPPORT: return "Address family not supported by protocol family (WSAEAFNOSUPPORT)"; + case WSAEADDRINUSE: return "Address already in use (WSAEADDRINUSE)"; + case WSAEADDRNOTAVAIL: return "Cannot assign requested address (WSAEADDRNOTAVAIL)"; + case WSAENETDOWN: return "Network is down (WSAENETDOWN)"; + case WSAENETUNREACH: return "Network is unreachable (WSAENETUNREACH)"; + case WSAENETRESET: return "Network dropped connection on reset (WSAENETRESET)"; + case WSAECONNABORTED: return "Software caused connection abort (WSAECONNABORTED)"; + case WSAECONNRESET: return "Connection reset by peer (WSAECONNRESET)"; + case WSAENOBUFS: return "No buffer space available (WSAENOBUFS)"; + case WSAEISCONN: return "Socket is already connected (WSAEISCONN)"; + case WSAENOTCONN: return "Socket is not connected (WSAENOTCONN)"; + case WSAESHUTDOWN: return "Cannot send after socket shutdown (WSAESHUTDOWN)"; + case WSAETOOMANYREFS: return "Too many references (WSAETOOMANYREFS)"; + case WSAETIMEDOUT: return "Connection timed out (WSAETIMEDOUT)"; + case WSAECONNREFUSED: return "Connection refused (WSAECONNREFUSED)"; + case WSAELOOP: return "Too many levels of symbolic links (WSAELOOP)"; + case WSAENAMETOOLONG: return "Filename too long (WSAENAMETOOLONG)"; + case WSAEHOSTDOWN: return "Host is down (WSAEHOSTDOWN)"; + case WSAEHOSTUNREACH: return "Host is unreachable (WSAEHOSTUNREACH)"; + case WSAENOTEMPTY: return "Resource not empty (WSAENOTEMPTY)"; + case WSAEPROCLIM: return "Too many processes (WSAEPROCLIM)"; + case WSAEUSERS: return "Too many users (WSAEUSERS)"; + case WSAEDQUOT: return "Disk quota exceeded (WSAEDQUOT)"; + case WSAESTALE: return "Stale NFS file handle (WSAESTALE)"; + case WSAEREMOTE: return "Too many levels of remote in path (WSAEREMOTE)"; + case WSAEDISCON: return "Graceful shutdown in progress (WSAEDISCON)"; + case WSASYSNOTREADY: return "Network subsystem is unavailable (WSASYSNOTREADY)"; + case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range (WSAVERNOTSUPPORTED)"; + case WSANOTINITIALISED: return "Successful WSAStartup not yet performed (WSANOTINITIALISED)"; +#ifdef WSATYPE_NOT_FOUND + case WSATYPE_NOT_FOUND: return "Class type not found (WSATYPE_NOT_FOUND)"; +#endif + case WSAHOST_NOT_FOUND: return "Host not found (WSAHOST_NOT_FOUND)"; + case WSATRY_AGAIN: return "Nonauthoritative host not found (WSATRY_AGAIN)"; + case WSANO_RECOVERY: return "This is a nonrecoverable error (WSANO_RECOVERY)"; + case WSANO_DATA: return "Valid name, no data record of requested type (WSANO_DATA)"; + default: + sprintf(otherErrMsg, "Unknown WinSock error: %u", err); + return otherErrMsg; + } +} + +#endif + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/CHANGELOG.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/CHANGELOG.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/CHANGELOG.md 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/CHANGELOG.md 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,149 @@ +## Version 2.8.0.0 + +* Breaking change: PortNumber originally contained Word32 in network + byte order and used "deriving Ord". This results in strange behavior + on the Ord instance. Now PortNumber holds Word32 in host byte order. + [#347](https://github.com/haskell/network/pull/347) +* Breaking change: stopping the export of the PortNum constructor in + PortNumber. +* Use bytestring == 0.10.* only. +* Use base >= 4.7 && < 5. + +## Version 2.7.0.2 + +* Removing withMVar to avoid the deadlock between "accept" and "close" + [#330](https://github.com/haskell/network/pull/330) +* "close" does not throw exceptions. A new API: "close'" throws + exceptions when necessary. + [#337](https://github.com/haskell/network/pull/337) +* Fixing the hang of lazy sendAll. + [#340](https://github.com/haskell/network/pull/340) +* Installing NetDef.h (#334) + [#334](https://github.com/haskell/network/pull/334) + +## Version 2.7.0.1 + + * A new API: socketPortSafe. + [#319](https://github.com/haskell/network/pull/319) + * Fixing a drain bug of sendAll. + [#320](https://github.com/haskell/network/pull/320) + * Porting the new CALLCONV convention from master. + [#313](https://github.com/haskell/network/pull/313) + * Withdrawing the deprecations of packFamily and unpackFamily. + [#324](https://github.com/haskell/network/pull/324) + +## Version 2.7.0.0 + + * Obsoleting the Network module. + * Obsoleting the Network.BSD module. + * Obsoleting APIs: MkSocket, htonl, ntohl, + getPeerCred, getPeerEid, + send, sendTo, recv, recvFrom, recvLen, + inet_addr, inet_ntoa, + isConnected, isBound, isListening, isReadable, isWritable, + aNY_PORT, iNADDR_ANY, iN6ADDR_ANY, sOMAXCONN, + sOL_SOCKET, sCM_RIGHTS, + packFamily, unpackFamily, packSocketType + * Do not closeFd within sendFd. + [#271](https://github.com/haskell/network/pull/271) + * Exporting ifNameToIndex and ifIndexToName from Network.Socket. + * New APIs: setCloseOnExecIfNeeded, getCloseOnExec and getNonBlock + * New APIs: isUnixDomainSocketAvailable and getPeerCredential + * socketPair, sendFd and recvFd are exported even on Windows. + +## Version 2.6.3.5 + + * Reverting "Do not closeFd within sendFd" + [#271](https://github.com/haskell/network/pull/271) + +## Version 2.6.3.4 + + * Don't touch IPv6Only when running on OpenBSD + [#227](https://github.com/haskell/network/pull/227) + * Do not closeFd within sendFd + [#271](https://github.com/haskell/network/pull/271) + * Updating examples and docs. + +## Version 2.6.3.3 + + * Adds a function to show the defaultHints without reading their undefined fields + [#291](https://github.com/haskell/network/pull/291) + * Improve exception error messages for getAddrInfo and getNameInfo + [#289](https://github.com/haskell/network/pull/289) + * Deprecating SockAddrCan. + +## Version 2.6.3.2 + + * Zero memory of `sockaddr_un` if abstract socket + [#220](https://github.com/haskell/network/pull/220) + + * Improving error messages + [#232](https://github.com/haskell/network/pull/232) + + * Allow non-blocking file descriptors via `setNonBlockIfNeeded` + [#242](https://github.com/haskell/network/pull/242) + + * Update config.{guess,sub} to latest version + [#244](https://github.com/haskell/network/pull/244) + + * Rename `my_inet_ntoa` to avoid symbol conflicts + [#228](https://github.com/haskell/network/pull/228) + + * Test infrastructure improvements + [#219](https://github.com/haskell/network/pull/219) + [#217](https://github.com/haskell/network/pull/217) + [#218](https://github.com/haskell/network/pull/218) + + * House keeping and cleanup + [#238](https://github.com/haskell/network/pull/238) + [#237](https://github.com/haskell/network/pull/237) + +## Version 2.6.3.1 + + * Reverse breaking exception change in `Network.Socket.ByteString.recv` + [#215](https://github.com/haskell/network/issues/215) + +## Version 2.6.3.0 + + * New maintainers: Evan Borden (@eborden) and Kazu Yamamoto (@kazu-yamamoto). + The maintainer for a long period, Johan Tibell (@tibbe) stepped down. + Thank you, Johan, for your hard work for a long time. + + * New APIs: ntohl, htonl,hostAddressToTuple{,6} and tupleToHostAddress{,6}. + [#210](https://github.com/haskell/network/pull/210) + + * Added a Read instance for PortNumber. [#145](https://github.com/haskell/network/pull/145) + + * We only set the IPV6_V6ONLY flag to 0 for stream and datagram socket types, + as opposed to all of them. This makes it possible to use ICMPv6. + [#180](https://github.com/haskell/network/pull/180) + [#181](https://github.com/haskell/network/pull/181) + + * Work around GHC bug #12020. Socket errors no longer cause segfaults or + hangs on Windows. [#192](https://github.com/haskell/network/pull/192) + + * Various documentation improvements and the deprecated pragmas. + [#186](https://github.com/haskell/network/pull/186) + [#201](https://github.com/haskell/network/issues/201) + [#205](https://github.com/haskell/network/pull/205) + [#206](https://github.com/haskell/network/pull/206) + [#211](https://github.com/haskell/network/issues/211) + + * Various internal improvements. + [#193](https://github.com/haskell/network/pull/193) + [#200](https://github.com/haskell/network/pull/200) + +## Version 2.6.2.1 + + * Regenerate configure and HsNetworkConfig.h.in. + + * Better detection of CAN sockets. + +## Version 2.6.2.0 + + * Add support for TCP_USER_TIMEOUT. + + * Don't conditionally export the SockAddr constructors. + + * Add isSupportSockAddr to allow checking for supported address types + at runtime. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/config.guess cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/config.guess --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/config.guess 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/config.guess 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,1466 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2017 Free Software Foundation, Inc. + +timestamp='2017-03-05' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2017 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = hppa2.0w ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + NSX-?:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +cat >&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/config.sub cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/config.sub --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/config.sub 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/config.sub 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,1836 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2017 Free Software Foundation, Inc. + +timestamp='2017-04-02' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2017 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + wasm32) + basic_machine=wasm32-unknown + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/configure cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/configure --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/configure 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/configure 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,5389 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for Haskell network package 2.6.3.1. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: libraries@haskell.org about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Haskell network package' +PACKAGE_TARNAME='network' +PACKAGE_VERSION='2.6.3.1' +PACKAGE_STRING='Haskell network package 2.6.3.1' +PACKAGE_BUGREPORT='libraries@haskell.org' +PACKAGE_URL='' + +ac_unique_file="include/HsNet.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +EXTRA_SRCS +EXTRA_LIBS +EXTRA_CPPFLAGS +CALLCONV +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_cc +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Haskell network package 2.6.3.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/network] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Haskell network package 2.6.3.1:";; + esac + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +C compiler + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Haskell network package configure 2.6.3.1 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------ ## +## Report this to libraries@haskell.org ## +## ------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Haskell network package $as_me 2.6.3.1, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_includes_default="$ac_includes_default +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_NETDB_H +# include +#endif +#ifdef HAVE_WINSOCK2_H +# include +#endif +#ifdef HAVE_WS2TCPIP_H +# include +// fix for MingW not defining IPV6_V6ONLY +# define IPV6_V6ONLY 27 +#endif" + +# Safety check: Ensure that we are in the correct source directory. + + +ac_config_headers="$ac_config_headers include/HsNetworkConfig.h" + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + +# Check whether --with-cc was given. +if test "${with_cc+set}" = set; then : + withval=$with_cc; CC=$withval +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in fcntl.h limits.h stdlib.h sys/types.h unistd.h winsock2.h ws2tcpip.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h linux/can.h linux/tcp.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in net/if.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" +if test "x$ac_cv_header_net_if_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF + +fi + +done + + +for ac_func in readlink symlink if_nametoindex +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_SYS_UIO_H +# include +#endif +" +if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrights" "ac_cv_member_struct_msghdr_msg_accrights" "#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_SYS_UIO_H +# include +#endif +" +if test "x$ac_cv_member_struct_msghdr_msg_accrights" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +" +if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_addr_t in netinet/in.h" >&5 +$as_echo_n "checking for in_addr_t in netinet/in.h... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "in_addr_t" >/dev/null 2>&1; then : + +$as_echo "#define HAVE_IN_ADDR_T 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f conftest* + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_PEERCRED and struct ucred in sys/socket.h" >&5 +$as_echo_n "checking for SO_PEERCRED and struct ucred in sys/socket.h... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef SO_PEERCRED +# error no SO_PEERCRED +#endif +struct ucred u; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_ucred=yes +else + ac_cv_ucred=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "x$ac_cv_ucred" = xno; then + old_CFLAGS="$CFLAGS" + CFLAGS="-D_GNU_SOURCE $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef SO_PEERCRED +# error no SO_PEERCRED +#endif +struct ucred u; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_ucred=yes +else + ac_cv_ucred=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "x$ac_cv_ucred" = xyes; then + EXTRA_CPPFLAGS=-D_GNU_SOURCE + fi +else + old_CFLAGS="$CFLAGS" +fi +if test "x$ac_cv_ucred" = xno; then + CFLAGS="$old_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + +$as_echo "#define HAVE_STRUCT_UCRED 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeereid in unistd.h" >&5 +$as_echo_n "checking for getpeereid in unistd.h... " >&6; } +ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid" +if test "x$ac_cv_func_getpeereid" = xyes; then : + +$as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _head_libws2_32_a in -lws2_32" >&5 +$as_echo_n "checking for _head_libws2_32_a in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32__head_libws2_32_a+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _head_libws2_32_a (); +int +main () +{ +return _head_libws2_32_a (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32__head_libws2_32_a=yes +else + ac_cv_lib_ws2_32__head_libws2_32_a=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32__head_libws2_32_a" >&5 +$as_echo "$ac_cv_lib_ws2_32__head_libws2_32_a" >&6; } +if test "x$ac_cv_lib_ws2_32__head_libws2_32_a" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + + LIBS="-lws2_32 $LIBS" + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int testme(){ getaddrinfo; } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + ac_have_getaddrinfo=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test "x$ac_have_getaddrinfo" = x; then + old_CFLAGS="$CFLAGS" + if test "z$ac_cv_lib_ws2_32__head_libws2_32_a" = zyes; then + CFLAGS="-DWINVER=0x0501 $CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo if WINVER is 0x0501" >&5 +$as_echo_n "checking for getaddrinfo if WINVER is 0x0501... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + int testme(){ getaddrinfo; } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + +$as_echo "#define NEED_WINVER_XP 1" >>confdefs.h + EXTRA_CPPFLAGS="-DWINVER=0x0501 $EXTRA_CPPFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + CFLAGS="$old_CFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +fi + +for ac_func in gai_strerror +do : + ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" +if test "x$ac_cv_func_gai_strerror" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GAI_STRERROR 1 +_ACEOF + +fi +done + + +ac_fn_c_check_decl "$LINENO" "AI_ADDRCONFIG" "ac_cv_have_decl_AI_ADDRCONFIG" "$ac_includes_default" +if test "x$ac_cv_have_decl_AI_ADDRCONFIG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_AI_ADDRCONFIG $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "AI_ALL" "ac_cv_have_decl_AI_ALL" "$ac_includes_default" +if test "x$ac_cv_have_decl_AI_ALL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_AI_ALL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "$ac_includes_default" +if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_AI_NUMERICSERV $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "AI_V4MAPPED" "ac_cv_have_decl_AI_V4MAPPED" "$ac_includes_default" +if test "x$ac_cv_have_decl_AI_V4MAPPED" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_AI_V4MAPPED $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "IPV6_V6ONLY" "ac_cv_have_decl_IPV6_V6ONLY" "$ac_includes_default" +if test "x$ac_cv_have_decl_IPV6_V6ONLY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPV6_V6ONLY $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "IPPROTO_IP" "ac_cv_have_decl_IPPROTO_IP" "$ac_includes_default" +if test "x$ac_cv_have_decl_IPPROTO_IP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPPROTO_IP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "IPPROTO_TCP" "ac_cv_have_decl_IPPROTO_TCP" "$ac_includes_default" +if test "x$ac_cv_have_decl_IPPROTO_TCP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPPROTO_TCP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "IPPROTO_IPV6" "ac_cv_have_decl_IPPROTO_IPV6" "$ac_includes_default" +if test "x$ac_cv_have_decl_IPPROTO_IPV6" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IPPROTO_IPV6 $ac_have_decl +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in sys/sendfile.h" >&5 +$as_echo_n "checking for sendfile in sys/sendfile.h... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sendfile" >/dev/null 2>&1; then : + +$as_echo "#define HAVE_LINUX_SENDFILE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f conftest* + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in sys/socket.h" >&5 +$as_echo_n "checking for sendfile in sys/socket.h... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sendfile" >/dev/null 2>&1; then : + +$as_echo "#define HAVE_BSD_SENDFILE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f conftest* + + +for ac_func in gethostent +do : + ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent" +if test "x$ac_cv_func_gethostent" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTENT 1 +_ACEOF + +fi +done + + +for ac_func in accept4 +do : + ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4" +if test "x$ac_cv_func_accept4" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACCEPT4 1 +_ACEOF + +fi +done + + +case "$host" in +*-mingw* | *-msys*) + EXTRA_SRCS="cbits/initWinSock.c, cbits/winSockErr.c, cbits/asyncAccept.c" + EXTRA_LIBS=ws2_32 + CALLCONV=stdcall ;; +*-solaris2*) + EXTRA_SRCS="cbits/ancilData.c" + EXTRA_LIBS="nsl, socket" + CALLCONV=ccall ;; +*) + EXTRA_SRCS="cbits/ancilData.c" + EXTRA_LIBS= + CALLCONV=ccall ;; +esac + + + + + +ac_config_files="$ac_config_files network.buildinfo" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Haskell network package $as_me 2.6.3.1, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +Haskell network package config.status 2.6.3.1 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "include/HsNetworkConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/HsNetworkConfig.h" ;; + "network.buildinfo") CONFIG_FILES="$CONFIG_FILES network.buildinfo" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/configure.ac cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/configure.ac --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/configure.ac 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,192 @@ +AC_INIT([Haskell network package], [2.8.0.0], [libraries@haskell.org], [network]) + +ac_includes_default="$ac_includes_default +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_NETDB_H +# include +#endif +#ifdef HAVE_WINSOCK2_H +# include +#endif +#ifdef HAVE_WS2TCPIP_H +# include +// fix for MingW not defining IPV6_V6ONLY +# define IPV6_V6ONLY 27 +#endif" + +# Safety check: Ensure that we are in the correct source directory. +AC_CONFIG_SRCDIR([include/HsNet.h]) + +AC_CONFIG_HEADERS([include/HsNetworkConfig.h]) + +AC_CANONICAL_HOST + +AC_ARG_WITH([cc], + [C compiler], + [CC=$withval]) +AC_PROG_CC() + +AC_C_CONST + +dnl ** check for specific header (.h) files that we are interested in +AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h sys/types.h unistd.h winsock2.h ws2tcpip.h]) +AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h linux/can.h linux/tcp.h]) +AC_CHECK_HEADERS([net/if.h]) + +AC_CHECK_FUNCS([readlink symlink if_nametoindex]) + +dnl ** check what fields struct msghdr contains +AC_CHECK_MEMBERS([struct msghdr.msg_control, struct msghdr.msg_accrights], [], [], [#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_SYS_UIO_H +# include +#endif]) + +dnl ** check if struct sockaddr contains sa_len +AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif]) + +dnl -------------------------------------------------- +dnl * test for in_addr_t +dnl -------------------------------------------------- +AC_MSG_CHECKING(for in_addr_t in netinet/in.h) +AC_EGREP_HEADER(in_addr_t, netinet/in.h, + [ AC_DEFINE([HAVE_IN_ADDR_T], [1], [Define to 1 if in_addr_t is available.]) AC_MSG_RESULT(yes) ], + AC_MSG_RESULT(no)) + +dnl -------------------------------------------------- +dnl * test for SO_PEERCRED and struct ucred +dnl -------------------------------------------------- +AC_MSG_CHECKING(for SO_PEERCRED and struct ucred in sys/socket.h) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#include +#ifndef SO_PEERCRED +# error no SO_PEERCRED +#endif +struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no) +if test "x$ac_cv_ucred" = xno; then + old_CFLAGS="$CFLAGS" + CFLAGS="-D_GNU_SOURCE $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#include +#ifndef SO_PEERCRED +# error no SO_PEERCRED +#endif +struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no) + if test "x$ac_cv_ucred" = xyes; then + EXTRA_CPPFLAGS=-D_GNU_SOURCE + fi +else + old_CFLAGS="$CFLAGS" +fi +if test "x$ac_cv_ucred" = xno; then + CFLAGS="$old_CFLAGS" + AC_MSG_RESULT(no) +else + AC_DEFINE([HAVE_STRUCT_UCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct ucred.]) + AC_MSG_RESULT(yes) +fi + +dnl -------------------------------------------------- +dnl * test for GETPEEREID(3) +dnl -------------------------------------------------- +AC_MSG_CHECKING(for getpeereid in unistd.h) +AC_CHECK_FUNC( getpeereid, AC_DEFINE([HAVE_GETPEEREID], [1], [Define to 1 if you have getpeereid.] )) + +dnl -------------------------------------------------- +dnl * check for Windows networking libraries +dnl -------------------------------------------------- +AC_CHECK_LIB(ws2_32, _head_libws2_32_a) + +dnl -------------------------------------------------- +dnl * test for getaddrinfo as proxy for IPv6 support +dnl -------------------------------------------------- +AC_MSG_CHECKING(for getaddrinfo) +dnl Can't use AC_CHECK_FUNC here, because it doesn't do the right +dnl thing on Windows. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default +int testme(){ getaddrinfo; }]])],[AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the `getaddrinfo' function.]) ac_have_getaddrinfo=yes; AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) + +dnl Under mingw, we may need to set WINVER to 0x0501 to expose getaddrinfo. +if test "x$ac_have_getaddrinfo" = x; then + old_CFLAGS="$CFLAGS" + if test "z$ac_cv_lib_ws2_32__head_libws2_32_a" = zyes; then + CFLAGS="-DWINVER=0x0501 $CFLAGS" + AC_MSG_CHECKING(for getaddrinfo if WINVER is 0x0501) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default + int testme(){ getaddrinfo; }]])],[AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the `getaddrinfo' function.]) AC_DEFINE([NEED_WINVER_XP], [1], [Define to 1 if the `getaddrinfo' function needs WINVER set.]) EXTRA_CPPFLAGS="-DWINVER=0x0501 $EXTRA_CPPFLAGS"; AC_MSG_RESULT(yes)],[CFLAGS="$old_CFLAGS"; AC_MSG_RESULT(no)]) + fi +fi + +dnl Missing under mingw, sigh. +AC_CHECK_FUNCS(gai_strerror) + +dnl ------------------------------------------------------- +dnl * test for AI_* flags that not all implementations have +dnl ------------------------------------------------------- +AC_CHECK_DECLS([AI_ADDRCONFIG, AI_ALL, AI_NUMERICSERV, AI_V4MAPPED]) + +dnl ------------------------------------------------------- +dnl * test for IPV6_V6ONLY flags that not all implementations have +dnl ------------------------------------------------------- +AC_CHECK_DECLS([IPV6_V6ONLY]) + +dnl ------------------------------------------------------- +dnl * test for IPPROTO_* macros/constants +dnl ------------------------------------------------------- +AC_CHECK_DECLS([IPPROTO_IP, IPPROTO_TCP, IPPROTO_IPV6]) + +dnl -------------------------------------------------- +dnl * test for Linux sendfile(2) +dnl -------------------------------------------------- +AC_MSG_CHECKING(for sendfile in sys/sendfile.h) +AC_EGREP_HEADER(sendfile, sys/sendfile.h, + [ AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have a Linux sendfile(2) implementation.]) AC_MSG_RESULT(yes) ], + AC_MSG_RESULT(no)) + +dnl -------------------------------------------------- +dnl * test for BSD sendfile(2) +dnl -------------------------------------------------- +AC_MSG_CHECKING(for sendfile in sys/socket.h) +AC_EGREP_HEADER(sendfile, sys/socket.h, + [ AC_DEFINE([HAVE_BSD_SENDFILE], [1], [Define to 1 if you have a BSDish sendfile(2) implementation.]) AC_MSG_RESULT(yes) ], + AC_MSG_RESULT(no)) + +AC_CHECK_FUNCS(gethostent) + +AC_CHECK_FUNCS(accept4) + +case "$host" in +*-mingw* | *-msys*) + EXTRA_SRCS="cbits/initWinSock.c, cbits/winSockErr.c, cbits/asyncAccept.c" + EXTRA_LIBS=ws2_32 + ;; +*-solaris2*) + EXTRA_SRCS="cbits/ancilData.c" + EXTRA_LIBS="nsl, socket" + ;; +*) + EXTRA_SRCS="cbits/ancilData.c" + EXTRA_LIBS= + ;; +esac +AC_SUBST([EXTRA_CPPFLAGS]) +AC_SUBST([EXTRA_LIBS]) +AC_SUBST([EXTRA_SRCS]) + +AC_CONFIG_FILES([network.buildinfo]) + +AC_OUTPUT diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/examples/EchoClient.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/examples/EchoClient.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/examples/EchoClient.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/examples/EchoClient.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,27 @@ +{-# LANGUAGE OverloadedStrings #-} +-- Echo client program +module Main (main) where + +import qualified Control.Exception as E +import qualified Data.ByteString.Char8 as C +import Network.Socket hiding (recv) +import Network.Socket.ByteString (recv, sendAll) + +main :: IO () +main = withSocketsDo $ do + addr <- resolve "127.0.0.1" "3000" + E.bracket (open addr) close talk + where + resolve host port = do + let hints = defaultHints { addrSocketType = Stream } + addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) + return addr + open addr = do + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) + connect sock $ addrAddress addr + return sock + talk sock = do + sendAll sock "Hello, world!" + msg <- recv sock 1024 + putStr "Received: " + C.putStrLn msg diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/examples/EchoServer.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/examples/EchoServer.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/examples/EchoServer.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/examples/EchoServer.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,41 @@ +-- Echo server program +module Main (main) where + +import Control.Concurrent (forkFinally) +import qualified Control.Exception as E +import Control.Monad (unless, forever, void) +import qualified Data.ByteString as S +import Network.Socket hiding (recv) +import Network.Socket.ByteString (recv, sendAll) + +main :: IO () +main = withSocketsDo $ do + addr <- resolve "3000" + E.bracket (open addr) close loop + where + resolve port = do + let hints = defaultHints { + addrFlags = [AI_PASSIVE] + , addrSocketType = Stream + } + addr:_ <- getAddrInfo (Just hints) Nothing (Just port) + return addr + open addr = do + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) + setSocketOption sock ReuseAddr 1 + -- If the prefork technique is not used, + -- set CloseOnExec for the security reasons. + let fd = fdSocket sock + setCloseOnExecIfNeeded fd + bind sock (addrAddress addr) + listen sock 10 + return sock + loop sock = forever $ do + (conn, peer) <- accept sock + putStrLn $ "Connection from " ++ show peer + void $ forkFinally (talk conn) (\_ -> close conn) + talk conn = do + msg <- recv conn 1024 + unless (S.null msg) $ do + sendAll conn msg + talk conn diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/include/HsNetDef.h cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/include/HsNetDef.h --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/include/HsNetDef.h 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/include/HsNetDef.h 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,45 @@ +#ifndef HSNETDEF_H +#define HSNETDEF_H + +#include "HsNetworkConfig.h" + +/* ultra-evil... */ +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION + +#if defined(HAVE_WINSOCK2_H) +# define WITH_WINSOCK 1 +#endif + +#if !defined(mingw32_HOST_OS) && !defined(_WIN32) +# define DOMAIN_SOCKET_SUPPORT 1 +#endif + +/* stdcall is for Windows 32. + Haskell FFI does not have a keyword for Windows 64. + If ccall/stdcall is specified on Windows 64, + GHC ignores it and use a proper ABI for Windows 64. + But if stdcall is specified, GHC displays a warning. + So, let's use ccall for Windows 64. + */ +#if defined(mingw32_HOST_OS) +# if defined(i386_HOST_ARCH) +# define CALLCONV stdcall +# elif defined(x86_64_HOST_ARCH) +# define CALLCONV ccall +# else +# error Unknown mingw32 arch +# endif +#else +# define CALLCONV ccall +#endif +#if defined(mingw32_HOST_OS) +# define SAFE_ON_WIN safe +#else +# define SAFE_ON_WIN unsafe +#endif + +#endif /* HSNETDEF_H */ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/include/HsNet.h cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/include/HsNet.h --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/include/HsNet.h 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/include/HsNet.h 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,165 @@ +/* ----------------------------------------------------------------------------- + * + * Definitions for package `network' which are visible in Haskell land. + * + * ---------------------------------------------------------------------------*/ + +#ifndef HSNET_H +#define HSNET_H + +#include "HsNetDef.h" + +#ifdef NEED_WINVER +# define WINVER 0x0501 +#endif + +#ifndef INLINE +# if defined(_MSC_VER) +# define INLINE extern __inline +# elif defined(__GNUC_GNU_INLINE__) +# define INLINE extern inline +# else +# define INLINE inline +# endif +#endif + +#ifdef HAVE_GETADDRINFO +# define IPV6_SOCKET_SUPPORT 1 +#else +# undef IPV6_SOCKET_SUPPORT +#endif + +#if defined(HAVE_WINSOCK2_H) +#include +# ifdef HAVE_WS2TCPIP_H +# include +// fix for MingW not defining IPV6_V6ONLY +# define IPV6_V6ONLY 27 +# endif + +extern int initWinSock (); +extern const char* getWSErrorDescr(int err); +extern void* newAcceptParams(int sock, + int sz, + void* sockaddr); +extern int acceptNewSock(void* d); +extern int acceptDoProc(void* param); + +#else + +#ifdef HAVE_LIMITS_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif +#ifdef HAVE_SYS_UIO_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_LINUX_TCP_H +# include +#elif HAVE_NETINET_TCP_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_SYS_UN_H +# include +#endif +#ifdef HAVE_ARPA_INET_H +# include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_LINUX_CAN_H +# include +# define CAN_SOCKET_SUPPORT 1 +#endif +#ifdef HAVE_NET_IF +# include +#endif + +#ifdef HAVE_BSD_SENDFILE +#include +#endif +#ifdef HAVE_LINUX_SENDFILE +#if !defined(__USE_FILE_OFFSET64) +#include +#endif +#endif + +extern int +sendFd(int sock, int outfd); + +extern int +recvFd(int sock); + +#endif /* HAVE_WINSOCK2_H */ + +INLINE char * +hsnet_inet_ntoa( +#if defined(HAVE_WINSOCK2_H) + u_long addr +#elif defined(HAVE_IN_ADDR_T) + in_addr_t addr +#elif defined(HAVE_INTTYPES_H) + u_int32_t addr +#else + unsigned long addr +#endif + ) +{ + struct in_addr a; + a.s_addr = addr; + return inet_ntoa(a); +} + +#ifdef HAVE_GETADDRINFO +INLINE int +hsnet_getnameinfo(const struct sockaddr* a,socklen_t b, char* c, +# if defined(HAVE_WINSOCK2_H) + DWORD d, char* e, DWORD f, int g) +# else + socklen_t d, char* e, socklen_t f, int g) +# endif +{ + return getnameinfo(a,b,c,d,e,f,g); +} + +INLINE int +hsnet_getaddrinfo(const char *hostname, const char *servname, + const struct addrinfo *hints, struct addrinfo **res) +{ + return getaddrinfo(hostname, servname, hints, res); +} + +INLINE void +hsnet_freeaddrinfo(struct addrinfo *ai) +{ + freeaddrinfo(ai); +} +#endif + +#if !defined(IOV_MAX) +# define IOV_MAX 1024 +#endif + +#if !defined(SOCK_NONBLOCK) // Missing define in Bionic libc (Android) +# define SOCK_NONBLOCK O_NONBLOCK +#endif + +#endif /* HSNET_H */ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/include/HsNetworkConfig.h.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/include/HsNetworkConfig.h.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/include/HsNetworkConfig.h.in 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/include/HsNetworkConfig.h.in 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,177 @@ +/* include/HsNetworkConfig.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `accept4' function. */ +#undef HAVE_ACCEPT4 + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have a BSDish sendfile(2) implementation. */ +#undef HAVE_BSD_SENDFILE + +/* Define to 1 if you have the declaration of `AI_ADDRCONFIG', and to 0 if you + don't. */ +#undef HAVE_DECL_AI_ADDRCONFIG + +/* Define to 1 if you have the declaration of `AI_ALL', and to 0 if you don't. + */ +#undef HAVE_DECL_AI_ALL + +/* Define to 1 if you have the declaration of `AI_NUMERICSERV', and to 0 if + you don't. */ +#undef HAVE_DECL_AI_NUMERICSERV + +/* Define to 1 if you have the declaration of `AI_V4MAPPED', and to 0 if you + don't. */ +#undef HAVE_DECL_AI_V4MAPPED + +/* Define to 1 if you have the declaration of `IPPROTO_IP', and to 0 if you + don't. */ +#undef HAVE_DECL_IPPROTO_IP + +/* Define to 1 if you have the declaration of `IPPROTO_IPV6', and to 0 if you + don't. */ +#undef HAVE_DECL_IPPROTO_IPV6 + +/* Define to 1 if you have the declaration of `IPPROTO_TCP', and to 0 if you + don't. */ +#undef HAVE_DECL_IPPROTO_TCP + +/* Define to 1 if you have the declaration of `IPV6_V6ONLY', and to 0 if you + don't. */ +#undef HAVE_DECL_IPV6_V6ONLY + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `gai_strerror' function. */ +#undef HAVE_GAI_STRERROR + +/* Define to 1 if you have the `getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the `gethostent' function. */ +#undef HAVE_GETHOSTENT + +/* Define to 1 if you have getpeereid. */ +#undef HAVE_GETPEEREID + +/* Define to 1 if you have the `if_nametoindex' function. */ +#undef HAVE_IF_NAMETOINDEX + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if in_addr_t is available. */ +#undef HAVE_IN_ADDR_T + +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#undef HAVE_LIBWS2_32 + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_CAN_H + +/* Define to 1 if you have a Linux sendfile(2) implementation. */ +#undef HAVE_LINUX_SENDFILE + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_TCP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + +/* Define to 1 if you have the `readlink' function. */ +#undef HAVE_READLINK + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */ +#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS + +/* Define to 1 if `msg_control' is a member of `struct msghdr'. */ +#undef HAVE_STRUCT_MSGHDR_MSG_CONTROL + +/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ +#undef HAVE_STRUCT_SOCKADDR_SA_LEN + +/* Define to 1 if you have both SO_PEERCRED and struct ucred. */ +#undef HAVE_STRUCT_UCRED + +/* Define to 1 if you have the `symlink' function. */ +#undef HAVE_SYMLINK + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WINSOCK2_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + +/* Define to 1 if the `getaddrinfo' function needs WINVER set. */ +#undef NEED_WINVER_XP + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/install-sh cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/install-sh --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/install-sh 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/install-sh 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,295 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2003-09-24.23 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename= +transform_arg= +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= + +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE + or: $0 -d DIR1 DIR2... + +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. +In the second, create the directory path DIR. + +Options: +-b=TRANSFORMBASENAME +-c copy source (using $cpprog) instead of moving (using $mvprog). +-d create directories instead of installing files. +-g GROUP $chgrp installed files to GROUP. +-m MODE $chmod installed files to MODE. +-o USER $chown installed files to USER. +-s strip installed files (using $stripprog). +-t=TRANSFORM +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) if test -z "$src"; then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if test -z "$src"; then + echo "$0: no input file specified." >&2 + exit 1 +fi + +# Protect names starting with `-'. +case $src in + -*) src=./$src ;; +esac + +if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + instcmd=: + chmodcmd= + else + instcmd=$mkdirprog + fi +else + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + dst=$dst/`basename "$src"` + fi +fi + +# This sed command emulates the dirname command. +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. + +# Skip lots of stat calls in the usual case. +if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + test -d "$pathcomp" || $mkdirprog "$pathcomp" + pathcomp=$pathcomp/ + done +fi + +if test -n "$dir_arg"; then + $doit $instcmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + +else + # If we're going to rename the final executable, determine the name now. + if test -z "$transformarg"; then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename \ + | sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename. + test -z "$dstfile" && dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Move or copy the file name to the temp name + $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now remove or move aside any old file at destination location. We + # try this two ways since rm can't unlink itself on some systems and + # the destination file might be busy for other reasons. In this case, + # the final cleanup might fail but the new file should still install + # successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" +fi && + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/LICENSE cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/LICENSE --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/LICENSE 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,29 @@ +Copyright (c) 2002-2010, The University Court of the University of Glasgow. +Copyright (c) 2007-2010, Johan Tibell + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +- Neither name of the University nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF +GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/BSD.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/BSD.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/BSD.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/BSD.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,574 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} +{-# OPTIONS_HADDOCK hide #-} +{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} +----------------------------------------------------------------------------- +-- | +-- Module : Network.BSD +-- Copyright : (c) The University of Glasgow 2001 +-- License : BSD-style (see the file libraries/network/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : experimental +-- Portability : non-portable +-- +-- The "Network.BSD" module defines Haskell bindings to network +-- programming functionality provided by BSD Unix derivatives. +-- +----------------------------------------------------------------------------- + +#include "HsNet.h" +##include "HsNetDef.h" + +module Network.BSD {-# DEPRECATED "This platform dependent module is no longer supported." #-} + ( + -- * Host names + HostName + , getHostName + + , HostEntry(..) + , getHostByName + , getHostByAddr + , hostAddress + +#if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS) + , getHostEntries + + -- ** Low level functionality + , setHostEntry + , getHostEntry + , endHostEntry +#endif + + -- * Service names + , ServiceEntry(..) + , ServiceName + , getServiceByName + , getServiceByPort + , getServicePortNumber + +#if !defined(mingw32_HOST_OS) + , getServiceEntries + + -- ** Low level functionality + , getServiceEntry + , setServiceEntry + , endServiceEntry +#endif + + -- * Protocol names + , ProtocolName + , ProtocolNumber + , ProtocolEntry(..) + , getProtocolByName + , getProtocolByNumber + , getProtocolNumber + , defaultProtocol + +#if !defined(mingw32_HOST_OS) + , getProtocolEntries + -- ** Low level functionality + , setProtocolEntry + , getProtocolEntry + , endProtocolEntry +#endif + + -- * Port numbers + , PortNumber + + -- * Network names + , NetworkName + , NetworkAddr + , NetworkEntry(..) + +#if !defined(mingw32_HOST_OS) + , getNetworkByName + , getNetworkByAddr + , getNetworkEntries + -- ** Low level functionality + , setNetworkEntry + , getNetworkEntry + , endNetworkEntry +#endif + +#if defined(HAVE_IF_NAMETOINDEX) + -- * Interface names + , ifNameToIndex +#endif + + ) where + +import Network.Socket + +import Control.Concurrent (MVar, newMVar, withMVar) +import qualified Control.Exception as E +import Foreign.C.String (CString, peekCString, withCString) +#if defined(HAVE_WINSOCK2_H) +import Foreign.C.Types ( CShort ) +#endif +import Foreign.C.Types ( CInt(..), CULong(..), CSize(..) ) +import Foreign.Ptr (Ptr, nullPtr) +import Foreign.Storable (Storable(..)) +import Foreign.Marshal.Array (allocaArray0, peekArray0) +import Foreign.Marshal.Utils (with, fromBool) +import Data.Typeable +import System.IO.Error (ioeSetErrorString, mkIOError) +import System.IO.Unsafe (unsafePerformIO) + +import GHC.IO.Exception + +import Control.Monad (liftM) + +import Network.Socket.Internal (throwSocketErrorIfMinus1_) + +-- --------------------------------------------------------------------------- +-- Basic Types + +type ProtocolName = String + +-- --------------------------------------------------------------------------- +-- Service Database Access + +-- Calling getServiceByName for a given service and protocol returns +-- the systems service entry. This should be used to find the port +-- numbers for standard protocols such as SMTP and FTP. The remaining +-- three functions should be used for browsing the service database +-- sequentially. + +-- Calling setServiceEntry with True indicates that the service +-- database should be left open between calls to getServiceEntry. To +-- close the database a call to endServiceEntry is required. This +-- database file is usually stored in the file /etc/services. + +data ServiceEntry = + ServiceEntry { + serviceName :: ServiceName, -- Official Name + serviceAliases :: [ServiceName], -- aliases + servicePort :: PortNumber, -- Port Number ( network byte order ) + serviceProtocol :: ProtocolName -- Protocol + } deriving (Show, Typeable) + +instance Storable ServiceEntry where + sizeOf _ = #const sizeof(struct servent) + alignment _ = alignment (undefined :: CInt) -- ??? + + peek p = do + s_name <- (#peek struct servent, s_name) p >>= peekCString + s_aliases <- (#peek struct servent, s_aliases) p + >>= peekArray0 nullPtr + >>= mapM peekCString + s_port <- (#peek struct servent, s_port) p + s_proto <- (#peek struct servent, s_proto) p >>= peekCString + return (ServiceEntry { + serviceName = s_name, + serviceAliases = s_aliases, +#if defined(HAVE_WINSOCK2_H) + servicePort = (fromIntegral (s_port :: CShort)), +#else + -- s_port is already in network byte order, but it + -- might be the wrong size. + servicePort = (fromIntegral (s_port :: CInt)), +#endif + serviceProtocol = s_proto + }) + + poke = throwUnsupportedOperationPoke "ServiceEntry" + + +-- | Get service by name. +getServiceByName :: ServiceName -- Service Name + -> ProtocolName -- Protocol Name + -> IO ServiceEntry -- Service Entry +getServiceByName name proto = withLock $ do + withCString name $ \ cstr_name -> do + withCString proto $ \ cstr_proto -> do + throwNoSuchThingIfNull "Network.BSD.getServiceByName" "no such service entry" + $ c_getservbyname cstr_name cstr_proto + >>= peek + +foreign import CALLCONV unsafe "getservbyname" + c_getservbyname :: CString -> CString -> IO (Ptr ServiceEntry) + +-- | Get the service given a 'PortNumber' and 'ProtocolName'. +getServiceByPort :: PortNumber -> ProtocolName -> IO ServiceEntry +getServiceByPort port proto = withLock $ do + withCString proto $ \ cstr_proto -> do + throwNoSuchThingIfNull "Network.BSD.getServiceByPort" "no such service entry" + $ c_getservbyport (fromIntegral port) cstr_proto + >>= peek + +foreign import CALLCONV unsafe "getservbyport" + c_getservbyport :: CInt -> CString -> IO (Ptr ServiceEntry) + +-- | Get the 'PortNumber' corresponding to the 'ServiceName'. +getServicePortNumber :: ServiceName -> IO PortNumber +getServicePortNumber name = do + (ServiceEntry _ _ port _) <- getServiceByName name "tcp" + return port + +#if !defined(mingw32_HOST_OS) +getServiceEntry :: IO ServiceEntry +getServiceEntry = withLock $ do + throwNoSuchThingIfNull "Network.BSD.getServiceEntry" "no such service entry" + $ c_getservent + >>= peek + +foreign import ccall unsafe "getservent" c_getservent :: IO (Ptr ServiceEntry) + +setServiceEntry :: Bool -> IO () +setServiceEntry flg = withLock $ c_setservent (fromBool flg) + +foreign import ccall unsafe "setservent" c_setservent :: CInt -> IO () + +endServiceEntry :: IO () +endServiceEntry = withLock $ c_endservent + +foreign import ccall unsafe "endservent" c_endservent :: IO () + +getServiceEntries :: Bool -> IO [ServiceEntry] +getServiceEntries stayOpen = do + setServiceEntry stayOpen + getEntries (getServiceEntry) (endServiceEntry) +#endif + +-- --------------------------------------------------------------------------- +-- Protocol Entries + +-- The following relate directly to the corresponding UNIX C +-- calls for returning the protocol entries. The protocol entry is +-- represented by the Haskell type ProtocolEntry. + +-- As for setServiceEntry above, calling setProtocolEntry. +-- determines whether or not the protocol database file, usually +-- @/etc/protocols@, is to be kept open between calls of +-- getProtocolEntry. Similarly, + +data ProtocolEntry = + ProtocolEntry { + protoName :: ProtocolName, -- Official Name + protoAliases :: [ProtocolName], -- aliases + protoNumber :: ProtocolNumber -- Protocol Number + } deriving (Read, Show, Typeable) + +instance Storable ProtocolEntry where + sizeOf _ = #const sizeof(struct protoent) + alignment _ = alignment (undefined :: CInt) -- ??? + + peek p = do + p_name <- (#peek struct protoent, p_name) p >>= peekCString + p_aliases <- (#peek struct protoent, p_aliases) p + >>= peekArray0 nullPtr + >>= mapM peekCString +#if defined(HAVE_WINSOCK2_H) + -- With WinSock, the protocol number is only a short; + -- hoist it in as such, but represent it on the Haskell side + -- as a CInt. + p_proto_short <- (#peek struct protoent, p_proto) p + let p_proto = fromIntegral (p_proto_short :: CShort) +#else + p_proto <- (#peek struct protoent, p_proto) p +#endif + return (ProtocolEntry { + protoName = p_name, + protoAliases = p_aliases, + protoNumber = p_proto + }) + + poke = throwUnsupportedOperationPoke "ProtocolEntry" + + +getProtocolByName :: ProtocolName -> IO ProtocolEntry +getProtocolByName name = withLock $ do + withCString name $ \ name_cstr -> do + throwNoSuchThingIfNull "Network.BSD.getProtocolByName" ("no such protocol name: " ++ name) + $ c_getprotobyname name_cstr + >>= peek + +foreign import CALLCONV unsafe "getprotobyname" + c_getprotobyname :: CString -> IO (Ptr ProtocolEntry) + + +getProtocolByNumber :: ProtocolNumber -> IO ProtocolEntry +getProtocolByNumber num = withLock $ do + throwNoSuchThingIfNull "Network.BSD.getProtocolByNumber" ("no such protocol number: " ++ show num) + $ c_getprotobynumber (fromIntegral num) + >>= peek + +foreign import CALLCONV unsafe "getprotobynumber" + c_getprotobynumber :: CInt -> IO (Ptr ProtocolEntry) + + +getProtocolNumber :: ProtocolName -> IO ProtocolNumber +getProtocolNumber proto = do + (ProtocolEntry _ _ num) <- getProtocolByName proto + return num + +#if !defined(mingw32_HOST_OS) +getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB +getProtocolEntry = withLock $ do + ent <- throwNoSuchThingIfNull "Network.BSD.getProtocolEntry" "no such protocol entry" + $ c_getprotoent + peek ent + +foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry) + +setProtocolEntry :: Bool -> IO () -- Keep DB Open ? +setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg) + +foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO () + +endProtocolEntry :: IO () +endProtocolEntry = withLock $ c_endprotoent + +foreign import ccall unsafe "endprotoent" c_endprotoent :: IO () + +getProtocolEntries :: Bool -> IO [ProtocolEntry] +getProtocolEntries stayOpen = withLock $ do + setProtocolEntry stayOpen + getEntries (getProtocolEntry) (endProtocolEntry) +#endif + +-- --------------------------------------------------------------------------- +-- Host lookups + +data HostEntry = + HostEntry { + hostName :: HostName, -- Official Name + hostAliases :: [HostName], -- aliases + hostFamily :: Family, -- Host Type (currently AF_INET) + hostAddresses :: [HostAddress] -- Set of Network Addresses (in network byte order) + } deriving (Read, Show, Typeable) + +instance Storable HostEntry where + sizeOf _ = #const sizeof(struct hostent) + alignment _ = alignment (undefined :: CInt) -- ??? + + peek p = do + h_name <- (#peek struct hostent, h_name) p >>= peekCString + h_aliases <- (#peek struct hostent, h_aliases) p + >>= peekArray0 nullPtr + >>= mapM peekCString + h_addrtype <- (#peek struct hostent, h_addrtype) p + -- h_length <- (#peek struct hostent, h_length) p + h_addr_list <- (#peek struct hostent, h_addr_list) p + >>= peekArray0 nullPtr + >>= mapM peek + return (HostEntry { + hostName = h_name, + hostAliases = h_aliases, +#if defined(HAVE_WINSOCK2_H) + hostFamily = unpackFamily (fromIntegral (h_addrtype :: CShort)), +#else + hostFamily = unpackFamily h_addrtype, +#endif + hostAddresses = h_addr_list + }) + + poke = throwUnsupportedOperationPoke "HostEntry" + + +-- convenience function: +hostAddress :: HostEntry -> HostAddress +hostAddress (HostEntry nm _ _ ls) = + case ls of + [] -> error $ "Network.BSD.hostAddress: empty network address list for " ++ nm + (x:_) -> x + +-- getHostByName must use the same lock as the *hostent functions +-- may cause problems if called concurrently. + +-- | Resolve a 'HostName' to IPv4 address. +getHostByName :: HostName -> IO HostEntry +getHostByName name = withLock $ do + withCString name $ \ name_cstr -> do + ent <- throwNoSuchThingIfNull "Network.BSD.getHostByName" "no such host entry" + $ c_gethostbyname name_cstr + peek ent + +foreign import CALLCONV safe "gethostbyname" + c_gethostbyname :: CString -> IO (Ptr HostEntry) + + +-- The locking of gethostbyaddr is similar to gethostbyname. +-- | Get a 'HostEntry' corresponding to the given address and family. +-- Note that only IPv4 is currently supported. +getHostByAddr :: Family -> HostAddress -> IO HostEntry +getHostByAddr family addr = do + with addr $ \ ptr_addr -> withLock $ do + throwNoSuchThingIfNull "Network.BSD.getHostByAddr" "no such host entry" + $ c_gethostbyaddr ptr_addr (fromIntegral (sizeOf addr)) (packFamily family) + >>= peek + +foreign import CALLCONV safe "gethostbyaddr" + c_gethostbyaddr :: Ptr HostAddress -> CInt -> CInt -> IO (Ptr HostEntry) + +#if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS) +getHostEntry :: IO HostEntry +getHostEntry = withLock $ do + throwNoSuchThingIfNull "Network.BSD.getHostEntry" "unable to retrieve host entry" + $ c_gethostent + >>= peek + +foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry) + +setHostEntry :: Bool -> IO () +setHostEntry flg = withLock $ c_sethostent (fromBool flg) + +foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO () + +endHostEntry :: IO () +endHostEntry = withLock $ c_endhostent + +foreign import ccall unsafe "endhostent" c_endhostent :: IO () + +getHostEntries :: Bool -> IO [HostEntry] +getHostEntries stayOpen = do + setHostEntry stayOpen + getEntries (getHostEntry) (endHostEntry) +#endif + +-- --------------------------------------------------------------------------- +-- Accessing network information + +-- Same set of access functions as for accessing host,protocol and +-- service system info, this time for the types of networks supported. + +-- network addresses are represented in host byte order. +type NetworkAddr = CULong + +type NetworkName = String + +data NetworkEntry = + NetworkEntry { + networkName :: NetworkName, -- official name + networkAliases :: [NetworkName], -- aliases + networkFamily :: Family, -- type + networkAddress :: NetworkAddr + } deriving (Read, Show, Typeable) + +instance Storable NetworkEntry where + sizeOf _ = #const sizeof(struct hostent) + alignment _ = alignment (undefined :: CInt) -- ??? + + peek p = do + n_name <- (#peek struct netent, n_name) p >>= peekCString + n_aliases <- (#peek struct netent, n_aliases) p + >>= peekArray0 nullPtr + >>= mapM peekCString + n_addrtype <- (#peek struct netent, n_addrtype) p + n_net <- (#peek struct netent, n_net) p + return (NetworkEntry { + networkName = n_name, + networkAliases = n_aliases, + networkFamily = unpackFamily (fromIntegral + (n_addrtype :: CInt)), + networkAddress = n_net + }) + + poke = throwUnsupportedOperationPoke "NetworkEntry" + + +#if !defined(mingw32_HOST_OS) +getNetworkByName :: NetworkName -> IO NetworkEntry +getNetworkByName name = withLock $ do + withCString name $ \ name_cstr -> do + throwNoSuchThingIfNull "Network.BSD.getNetworkByName" "no such network entry" + $ c_getnetbyname name_cstr + >>= peek + +foreign import ccall unsafe "getnetbyname" + c_getnetbyname :: CString -> IO (Ptr NetworkEntry) + +getNetworkByAddr :: NetworkAddr -> Family -> IO NetworkEntry +getNetworkByAddr addr family = withLock $ do + throwNoSuchThingIfNull "Network.BSD.getNetworkByAddr" "no such network entry" + $ c_getnetbyaddr addr (packFamily family) + >>= peek + +foreign import ccall unsafe "getnetbyaddr" + c_getnetbyaddr :: NetworkAddr -> CInt -> IO (Ptr NetworkEntry) + +getNetworkEntry :: IO NetworkEntry +getNetworkEntry = withLock $ do + throwNoSuchThingIfNull "Network.BSD.getNetworkEntry" "no more network entries" + $ c_getnetent + >>= peek + +foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry) + +-- | Open the network name database. The parameter specifies +-- whether a connection is maintained open between various +-- networkEntry calls +setNetworkEntry :: Bool -> IO () +setNetworkEntry flg = withLock $ c_setnetent (fromBool flg) + +foreign import ccall unsafe "setnetent" c_setnetent :: CInt -> IO () + +-- | Close the connection to the network name database. +endNetworkEntry :: IO () +endNetworkEntry = withLock $ c_endnetent + +foreign import ccall unsafe "endnetent" c_endnetent :: IO () + +-- | Get the list of network entries. +getNetworkEntries :: Bool -> IO [NetworkEntry] +getNetworkEntries stayOpen = do + setNetworkEntry stayOpen + getEntries (getNetworkEntry) (endNetworkEntry) +#endif + +-- Mutex for name service lockdown + +{-# NOINLINE lock #-} +lock :: MVar () +lock = unsafePerformIO $ withSocketsDo $ newMVar () + +withLock :: IO a -> IO a +withLock act = withMVar lock (\_ -> act) + +-- --------------------------------------------------------------------------- +-- Miscellaneous Functions + +-- | Calling getHostName returns the standard host name for the current +-- processor, as set at boot time. + +getHostName :: IO HostName +getHostName = do + let size = 256 + allocaArray0 size $ \ cstr -> do + throwSocketErrorIfMinus1_ "Network.BSD.getHostName" $ c_gethostname cstr (fromIntegral size) + peekCString cstr + +foreign import CALLCONV unsafe "gethostname" + c_gethostname :: CString -> CSize -> IO CInt + +-- Helper function used by the exported functions that provides a +-- Haskellised view of the enumerator functions: + +getEntries :: IO a -- read + -> IO () -- at end + -> IO [a] +getEntries getOne atEnd = loop + where + loop = do + vv <- E.catch (liftM Just getOne) + (\ e -> let _types = e :: IOException in return Nothing) + case vv of + Nothing -> return [] + Just v -> loop >>= \ vs -> atEnd >> return (v:vs) + + +throwNoSuchThingIfNull :: String -> String -> IO (Ptr a) -> IO (Ptr a) +throwNoSuchThingIfNull loc desc act = do + ptr <- act + if (ptr == nullPtr) + then ioError (ioeSetErrorString (mkIOError NoSuchThing loc Nothing Nothing) desc) + else return ptr + +throwUnsupportedOperationPoke :: String -> Ptr a -> a -> IO () +throwUnsupportedOperationPoke typ _ _ = + ioError $ ioeSetErrorString ioe "Operation not implemented" + where + ioe = mkIOError UnsupportedOperation + ("Network.BSD: instance Storable " ++ typ ++ ": poke") + Nothing + Nothing diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Internal.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Internal.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Internal.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Internal.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,55 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + +-- | +-- Module : Network.Socket.ByteString.Internal +-- Copyright : (c) Johan Tibell 2007-2010 +-- License : BSD-style +-- +-- Maintainer : johan.tibell@gmail.com +-- Stability : stable +-- Portability : portable +-- +module Network.Socket.ByteString.Internal + ( + mkInvalidRecvArgError +#if !defined(mingw32_HOST_OS) + , c_writev + , c_sendmsg +#endif + , waitWhen0 + ) where + +import System.IO.Error (ioeSetErrorString, mkIOError) + +#if !defined(mingw32_HOST_OS) +import Foreign.C.Types (CInt(..)) +import System.Posix.Types (CSsize(..)) +import Foreign.Ptr (Ptr) + +import Network.Socket.ByteString.IOVec (IOVec) +import Network.Socket.ByteString.MsgHdr (MsgHdr) +#endif + +import Control.Concurrent (threadWaitWrite, rtsSupportsBoundThreads) +import Control.Monad (when) +import GHC.IO.Exception (IOErrorType(..)) +import Network.Socket.Types + +mkInvalidRecvArgError :: String -> IOError +mkInvalidRecvArgError loc = ioeSetErrorString (mkIOError + InvalidArgument + loc Nothing Nothing) "non-positive length" + +#if !defined(mingw32_HOST_OS) +foreign import ccall unsafe "writev" + c_writev :: CInt -> Ptr IOVec -> CInt -> IO CSsize + +foreign import ccall unsafe "sendmsg" + c_sendmsg :: CInt -> Ptr MsgHdr -> CInt -> IO CSsize +#endif + +waitWhen0 :: Int -> Socket -> IO () +waitWhen0 0 s = when rtsSupportsBoundThreads $ do + let fd = fromIntegral $ fdSocket s + threadWaitWrite fd +waitWhen0 _ _ = return () diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/IOVec.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/IOVec.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/IOVec.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/IOVec.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,31 @@ +{-# OPTIONS_GHC -funbox-strict-fields #-} + +-- | Support module for the POSIX writev system call. +module Network.Socket.ByteString.IOVec + ( IOVec(..) + ) where + +import Foreign.C.Types (CChar, CInt, CSize) +import Foreign.Ptr (Ptr) +import Foreign.Storable (Storable(..)) + +#include +#include + +data IOVec = IOVec + { iovBase :: !(Ptr CChar) + , iovLen :: !CSize + } + +instance Storable IOVec where + sizeOf _ = (#const sizeof(struct iovec)) + alignment _ = alignment (undefined :: CInt) + + peek p = do + base <- (#peek struct iovec, iov_base) p + len <- (#peek struct iovec, iov_len) p + return $ IOVec base len + + poke p iov = do + (#poke struct iovec, iov_base) p (iovBase iov) + (#poke struct iovec, iov_len) p (iovLen iov) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Posix.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Posix.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Posix.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Posix.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,59 @@ +{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE OverloadedStrings #-} + +module Network.Socket.ByteString.Lazy.Posix + ( + -- * Send data to a socket + send + , sendAll + ) where + +import Control.Monad (liftM, when) +import qualified Data.ByteString.Lazy as L +import Data.ByteString.Lazy.Internal (ByteString(..)) +import Data.ByteString.Unsafe (unsafeUseAsCStringLen) +import Data.Int (Int64) +import Foreign.Marshal.Array (allocaArray) +import Foreign.Ptr (plusPtr) +import Foreign.Storable (Storable(..)) + +import Network.Socket (Socket(..)) +import Network.Socket.ByteString.IOVec (IOVec(IOVec)) +import Network.Socket.ByteString.Internal (c_writev, waitWhen0) +import Network.Socket.Internal + +-- ----------------------------------------------------------------------------- +-- Sending + +send :: Socket -- ^ Connected socket + -> ByteString -- ^ Data to send + -> IO Int64 -- ^ Number of bytes sent +send sock@(MkSocket fd _ _ _ _) s = do + let cs = take maxNumChunks (L.toChunks s) + len = length cs + liftM fromIntegral . allocaArray len $ \ptr -> + withPokes cs ptr $ \niovs -> + throwSocketErrorWaitWrite sock "writev" $ + c_writev (fromIntegral fd) ptr niovs + where + withPokes ss p f = loop ss p 0 0 + where loop (c:cs) q k !niovs + | k < maxNumBytes = + unsafeUseAsCStringLen c $ \(ptr,len) -> do + poke q $ IOVec ptr (fromIntegral len) + loop cs (q `plusPtr` sizeOf (undefined :: IOVec)) + (k + fromIntegral len) (niovs + 1) + | otherwise = f niovs + loop _ _ _ niovs = f niovs + maxNumBytes = 4194304 :: Int -- maximum number of bytes to transmit in one system call + maxNumChunks = 1024 :: Int -- maximum number of chunks to transmit in one system call + +sendAll :: Socket -- ^ Connected socket + -> ByteString -- ^ Data to send + -> IO () +sendAll _ "" = return () +sendAll sock bs = do + sent <- send sock bs + waitWhen0 (fromIntegral sent) sock + when (sent >= 0) $ sendAll sock $ L.drop sent bs diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Windows.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Windows.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Windows.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Lazy/Windows.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,40 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE OverloadedStrings #-} + +module Network.Socket.ByteString.Lazy.Windows + ( + -- * Send data to a socket + send + , sendAll + ) where + +import Control.Applicative ((<$>)) +import Control.Monad (when) +import qualified Data.ByteString as S +import qualified Data.ByteString.Lazy as L +import Data.Int (Int64) + +import Network.Socket (Socket(..)) +import qualified Network.Socket.ByteString as Socket +import Network.Socket.ByteString.Internal (waitWhen0) + +-- ----------------------------------------------------------------------------- +-- Sending + +send :: Socket -- ^ Connected socket + -> L.ByteString -- ^ Data to send + -> IO Int64 -- ^ Number of bytes sent +send sock s = do + fromIntegral <$> case L.toChunks s of + -- TODO: Consider doing nothing if the string is empty. + [] -> Socket.send sock S.empty + (x:_) -> Socket.send sock x + +sendAll :: Socket -- ^ Connected socket + -> L.ByteString -- ^ Data to send + -> IO () +sendAll _ "" = return () +sendAll sock bs = do + sent <- send sock bs + waitWhen0 (fromIntegral sent) sock + when (sent >= 0) $ sendAll sock $ L.drop sent bs diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Lazy.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Lazy.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/Lazy.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/Lazy.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,88 @@ +{-# LANGUAGE CPP #-} + +-- | +-- Module : Network.Socket.ByteString.Lazy +-- Copyright : (c) Bryan O'Sullivan 2009 +-- License : BSD-style +-- +-- Maintainer : bos@serpentine.com +-- Stability : experimental +-- Portability : POSIX, GHC +-- +-- This module provides access to the BSD /socket/ interface. This +-- module is generally more efficient than the 'String' based network +-- functions in 'Network.Socket'. For detailed documentation, consult +-- your favorite POSIX socket reference. All functions communicate +-- failures by converting the error number to 'System.IO.IOError'. +-- +-- This module is made to be imported with 'Network.Socket' like so: +-- +-- > import Network.Socket hiding (send, sendTo, recv, recvFrom) +-- > import Network.Socket.ByteString.Lazy +-- > import Prelude hiding (getContents) +-- +module Network.Socket.ByteString.Lazy + ( + -- * Send data to a socket + send + , sendAll + , + + -- * Receive data from a socket + getContents + , recv + ) where + +import Control.Monad (liftM) +import Data.ByteString.Lazy.Internal (ByteString(..), defaultChunkSize) +import Data.Int (Int64) +import Network.Socket (Socket(..), ShutdownCmd(..), shutdown) +import Prelude hiding (getContents) +import System.IO.Unsafe (unsafeInterleaveIO) + +import qualified Data.ByteString as S +import qualified Network.Socket.ByteString as N + +#if defined(mingw32_HOST_OS) +import Network.Socket.ByteString.Lazy.Windows (send, sendAll) +#else +import Network.Socket.ByteString.Lazy.Posix (send, sendAll) +#endif + +-- ----------------------------------------------------------------------------- +-- Receiving + +-- | Receive data from the socket. The socket must be in a connected +-- state. Data is received on demand, in chunks; each chunk will be +-- sized to reflect the amount of data received by individual 'recv' +-- calls. +-- +-- All remaining data from the socket is consumed. When there is no +-- more data to be received, the receiving side of the socket is shut +-- down. If there is an error and an exception is thrown, the socket +-- is not shut down. +getContents :: Socket -- ^ Connected socket + -> IO ByteString -- ^ Data received +getContents sock = loop where + loop = unsafeInterleaveIO $ do + s <- N.recv sock defaultChunkSize + if S.null s + then shutdown sock ShutdownReceive >> return Empty + else Chunk s `liftM` loop + +-- | Receive data from the socket. The socket must be in a connected +-- state. This function may return fewer bytes than specified. If +-- the received data is longer than the specified length, it may be +-- discarded depending on the type of socket. This function may block +-- until a message arrives. +-- +-- If there is no more data to be received, returns an empty 'ByteString'. +-- +-- Receiving data from closed socket may lead to undefined behaviour. +recv :: Socket -- ^ Connected socket + -> Int64 -- ^ Maximum number of bytes to receive + -> IO ByteString -- ^ Data received +recv sock nbytes = chunk `liftM` N.recv sock (fromIntegral nbytes) where + chunk k + | S.null k = Empty + | otherwise = Chunk k Empty diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/MsgHdr.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/MsgHdr.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString/MsgHdr.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString/MsgHdr.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,48 @@ +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} + +-- | Support module for the POSIX 'sendmsg' system call. +module Network.Socket.ByteString.MsgHdr + ( MsgHdr(..) + ) where + +#include +#include + +import Foreign.C.Types (CInt, CSize, CUInt) +import Foreign.Ptr (Ptr) +import Foreign.Storable (Storable(..)) +import Network.Socket (SockAddr) +import Network.Socket.Internal (zeroMemory) + +import Network.Socket.ByteString.IOVec (IOVec) + +-- We don't use msg_control, msg_controllen, and msg_flags as these +-- don't exist on OpenSolaris. +data MsgHdr = MsgHdr + { msgName :: !(Ptr SockAddr) + , msgNameLen :: !CUInt + , msgIov :: !(Ptr IOVec) + , msgIovLen :: !CSize + } + +instance Storable MsgHdr where + sizeOf _ = (#const sizeof(struct msghdr)) + alignment _ = alignment (undefined :: CInt) + + peek p = do + name <- (#peek struct msghdr, msg_name) p + nameLen <- (#peek struct msghdr, msg_namelen) p + iov <- (#peek struct msghdr, msg_iov) p + iovLen <- (#peek struct msghdr, msg_iovlen) p + return $ MsgHdr name nameLen iov iovLen + + poke p mh = do + -- We need to zero the msg_control, msg_controllen, and msg_flags + -- fields, but they only exist on some platforms (e.g. not on + -- Solaris). Instead of using CPP, we zero the entire struct. + zeroMemory p (#const sizeof(struct msghdr)) + (#poke struct msghdr, msg_name) p (msgName mh) + (#poke struct msghdr, msg_namelen) p (msgNameLen mh) + (#poke struct msghdr, msg_iov) p (msgIov mh) + (#poke struct msghdr, msg_iovlen) p (msgIovLen mh) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/ByteString.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/ByteString.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,285 @@ +{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} +{-# LANGUAGE CPP, ForeignFunctionInterface #-} +{-# LANGUAGE OverloadedStrings #-} + +#include "HsNet.h" + +-- | +-- Module : Network.Socket.ByteString +-- Copyright : (c) Johan Tibell 2007-2010 +-- License : BSD-style +-- +-- Maintainer : johan.tibell@gmail.com +-- Stability : stable +-- Portability : portable +-- +-- This module provides access to the BSD /socket/ interface. This +-- module is generally more efficient than the 'String' based network +-- functions in 'Network.Socket'. For detailed documentation, consult +-- your favorite POSIX socket reference. All functions communicate +-- failures by converting the error number to 'System.IO.IOError'. +-- +-- This module is made to be imported with 'Network.Socket' like so: +-- +-- > import Network.Socket hiding (send, sendTo, recv, recvFrom) +-- > import Network.Socket.ByteString +-- +module Network.Socket.ByteString + ( + -- * Send data to a socket + send + , sendAll + , sendTo + , sendAllTo + + -- ** Vectored I/O + -- $vectored + , sendMany + , sendManyTo + + -- * Receive data from a socket + , recv + , recvFrom + ) where + +import Control.Exception as E (catch, throwIO) +import Control.Monad (when) +import Data.ByteString (ByteString) +import Data.ByteString.Internal (createAndTrim) +import Data.ByteString.Unsafe (unsafeUseAsCStringLen) +import Foreign.Marshal.Alloc (allocaBytes) +import Foreign.Ptr (castPtr) +import Network.Socket (sendBuf, sendBufTo, recvBuf, recvBufFrom) +import System.IO.Error (isEOFError) + +import qualified Data.ByteString as B + +import Network.Socket.ByteString.Internal +import Network.Socket.Internal +import Network.Socket.Types + +#if !defined(mingw32_HOST_OS) +import Control.Monad (liftM, zipWithM_) +import Foreign.Marshal.Array (allocaArray) +import Foreign.Marshal.Utils (with) +import Foreign.Ptr (Ptr, plusPtr) +import Foreign.Storable (Storable(..)) + +import Network.Socket.ByteString.IOVec (IOVec(..)) +import Network.Socket.ByteString.MsgHdr (MsgHdr(..)) +#endif + +-- ---------------------------------------------------------------------------- +-- Sending + +-- | Send data to the socket. The socket must be connected to a +-- remote socket. Returns the number of bytes sent. Applications are +-- responsible for ensuring that all data has been sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +send :: Socket -- ^ Connected socket + -> ByteString -- ^ Data to send + -> IO Int -- ^ Number of bytes sent +send sock xs = unsafeUseAsCStringLen xs $ \(str, len) -> + sendBuf sock (castPtr str) len + +-- | Send data to the socket. The socket must be connected to a +-- remote socket. Unlike 'send', this function continues to send data +-- until either all data has been sent or an error occurs. On error, +-- an exception is raised, and there is no way to determine how much +-- data, if any, was successfully sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +sendAll :: Socket -- ^ Connected socket + -> ByteString -- ^ Data to send + -> IO () +sendAll _ "" = return () +sendAll sock bs = do + sent <- send sock bs + waitWhen0 sent sock + when (sent >= 0) $ sendAll sock $ B.drop sent bs + +-- | Send data to the socket. The recipient can be specified +-- explicitly, so the socket need not be in a connected state. +-- Returns the number of bytes sent. Applications are responsible for +-- ensuring that all data has been sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +sendTo :: Socket -- ^ Socket + -> ByteString -- ^ Data to send + -> SockAddr -- ^ Recipient address + -> IO Int -- ^ Number of bytes sent +sendTo sock xs addr = + unsafeUseAsCStringLen xs $ \(str, len) -> sendBufTo sock str len addr + +-- | Send data to the socket. The recipient can be specified +-- explicitly, so the socket need not be in a connected state. Unlike +-- 'sendTo', this function continues to send data until either all +-- data has been sent or an error occurs. On error, an exception is +-- raised, and there is no way to determine how much data, if any, was +-- successfully sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +sendAllTo :: Socket -- ^ Socket + -> ByteString -- ^ Data to send + -> SockAddr -- ^ Recipient address + -> IO () +sendAllTo _ "" _ = return () +sendAllTo sock xs addr = do + sent <- sendTo sock xs addr + waitWhen0 sent sock + when (sent >= 0) $ sendAllTo sock (B.drop sent xs) addr + +-- ---------------------------------------------------------------------------- +-- ** Vectored I/O + +-- $vectored +-- +-- Vectored I\/O, also known as scatter\/gather I\/O, allows multiple +-- data segments to be sent using a single system call, without first +-- concatenating the segments. For example, given a list of +-- @ByteString@s, @xs@, +-- +-- > sendMany sock xs +-- +-- is equivalent to +-- +-- > sendAll sock (concat xs) +-- +-- but potentially more efficient. +-- +-- Vectored I\/O are often useful when implementing network protocols +-- that, for example, group data into segments consisting of one or +-- more fixed-length headers followed by a variable-length body. + +-- | Send data to the socket. The socket must be in a connected +-- state. The data is sent as if the parts have been concatenated. +-- This function continues to send data until either all data has been +-- sent or an error occurs. On error, an exception is raised, and +-- there is no way to determine how much data, if any, was +-- successfully sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +sendMany :: Socket -- ^ Connected socket + -> [ByteString] -- ^ Data to send + -> IO () +#if !defined(mingw32_HOST_OS) +sendMany _ [] = return () +sendMany sock@(MkSocket fd _ _ _ _) cs = do + sent <- sendManyInner + waitWhen0 sent sock + when (sent >= 0) $ sendMany sock (remainingChunks sent cs) + where + sendManyInner = + liftM fromIntegral . withIOVec cs $ \(iovsPtr, iovsLen) -> + throwSocketErrorWaitWrite sock "Network.Socket.ByteString.sendMany" $ + c_writev (fromIntegral fd) iovsPtr + (fromIntegral (min iovsLen (#const IOV_MAX))) +#else +sendMany sock = sendAll sock . B.concat +#endif + +-- | Send data to the socket. The recipient can be specified +-- explicitly, so the socket need not be in a connected state. The +-- data is sent as if the parts have been concatenated. This function +-- continues to send data until either all data has been sent or an +-- error occurs. On error, an exception is raised, and there is no +-- way to determine how much data, if any, was successfully sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +sendManyTo :: Socket -- ^ Socket + -> [ByteString] -- ^ Data to send + -> SockAddr -- ^ Recipient address + -> IO () +#if !defined(mingw32_HOST_OS) +sendManyTo _ [] _ = return () +sendManyTo sock@(MkSocket fd _ _ _ _) cs addr = do + sent <- liftM fromIntegral sendManyToInner + waitWhen0 sent sock + when (sent >= 0) $ sendManyTo sock (remainingChunks sent cs) addr + where + sendManyToInner = + withSockAddr addr $ \addrPtr addrSize -> + withIOVec cs $ \(iovsPtr, iovsLen) -> do + let msgHdr = MsgHdr + addrPtr (fromIntegral addrSize) + iovsPtr (fromIntegral iovsLen) + with msgHdr $ \msgHdrPtr -> + throwSocketErrorWaitWrite sock "Network.Socket.ByteString.sendManyTo" $ + c_sendmsg (fromIntegral fd) msgHdrPtr 0 +#else +sendManyTo sock cs = sendAllTo sock (B.concat cs) +#endif + +-- ---------------------------------------------------------------------------- +-- Receiving + +-- | Receive data from the socket. The socket must be in a connected +-- state. This function may return fewer bytes than specified. If +-- the message is longer than the specified length, it may be +-- discarded depending on the type of socket. This function may block +-- until a message arrives. +-- +-- Considering hardware and network realities, the maximum number of bytes to +-- receive should be a small power of 2, e.g., 4096. +-- +-- For TCP sockets, a zero length return value means the peer has +-- closed its half side of the connection. +-- +-- Receiving data from closed socket may lead to undefined behaviour. +recv :: Socket -- ^ Connected socket + -> Int -- ^ Maximum number of bytes to receive + -> IO ByteString -- ^ Data received +recv sock nbytes + | nbytes < 0 = ioError (mkInvalidRecvArgError "Network.Socket.ByteString.recv") + | otherwise = createAndTrim nbytes $ \ptr -> + E.catch + (recvBuf sock ptr nbytes) + (\e -> if isEOFError e then return 0 else throwIO e) + +-- | Receive data from the socket. The socket need not be in a +-- connected state. Returns @(bytes, address)@ where @bytes@ is a +-- 'ByteString' representing the data received and @address@ is a +-- 'SockAddr' representing the address of the sending socket. +-- +-- Receiving data from closed socket may lead to undefined behaviour. +recvFrom :: Socket -- ^ Socket + -> Int -- ^ Maximum number of bytes to receive + -> IO (ByteString, SockAddr) -- ^ Data received and sender address +recvFrom sock nbytes = + allocaBytes nbytes $ \ptr -> do + (len, sockaddr) <- recvBufFrom sock ptr nbytes + str <- B.packCStringLen (ptr, len) + return (str, sockaddr) + +-- ---------------------------------------------------------------------------- +-- Not exported + +#if !defined(mingw32_HOST_OS) +-- | Suppose we try to transmit a list of chunks @cs@ via a gathering write +-- operation and find that @n@ bytes were sent. Then @remainingChunks n cs@ is +-- list of chunks remaining to be sent. +remainingChunks :: Int -> [ByteString] -> [ByteString] +remainingChunks _ [] = [] +remainingChunks i (x:xs) + | i < len = B.drop i x : xs + | otherwise = let i' = i - len in i' `seq` remainingChunks i' xs + where + len = B.length x + +-- | @withIOVec cs f@ executes the computation @f@, passing as argument a pair +-- consisting of a pointer to a temporarily allocated array of pointers to +-- IOVec made from @cs@ and the number of pointers (@length cs@). +-- /Unix only/. +withIOVec :: [ByteString] -> ((Ptr IOVec, Int) -> IO a) -> IO a +withIOVec cs f = + allocaArray csLen $ \aPtr -> do + zipWithM_ pokeIov (ptrs aPtr) cs + f (aPtr, csLen) + where + csLen = length cs + ptrs = iterate (`plusPtr` sizeOf (undefined :: IOVec)) + pokeIov ptr s = + unsafeUseAsCStringLen s $ \(sPtr, sLen) -> + poke ptr $ IOVec sPtr (fromIntegral sLen) +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/Internal.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/Internal.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/Internal.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/Internal.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,277 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE ForeignFunctionInterface #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} +----------------------------------------------------------------------------- +-- | +-- Module : Network.Socket.Internal +-- Copyright : (c) The University of Glasgow 2001 +-- License : BSD-style (see the file libraries/network/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A module containing semi-public 'Network.Socket' internals. +-- Modules which extend the 'Network.Socket' module will need to use +-- this module while ideally most users will be able to make do with +-- the public interface. +-- +----------------------------------------------------------------------------- + +#include "HsNet.h" +##include "HsNetDef.h" + +module Network.Socket.Internal + ( + -- * Socket addresses + HostAddress +#if defined(IPV6_SOCKET_SUPPORT) + , HostAddress6 + , FlowInfo + , ScopeID +#endif + , PortNumber(..) + , SockAddr(..) + + , peekSockAddr + , pokeSockAddr + , sizeOfSockAddr + , sizeOfSockAddrByFamily + , withSockAddr + , withNewSockAddr + + -- * Protocol families + , Family(..) + + -- * Socket error functions +#if defined(HAVE_WINSOCK2_H) + , c_getLastError +#endif + , throwSocketError + , throwSocketErrorCode + + -- * Guards for socket operations that may fail + , throwSocketErrorIfMinus1_ + , throwSocketErrorIfMinus1Retry + , throwSocketErrorIfMinus1Retry_ + , throwSocketErrorIfMinus1RetryMayBlock + + -- ** Guards that wait and retry if the operation would block + -- | These guards are based on 'throwSocketErrorIfMinus1RetryMayBlock'. + -- They wait for socket readiness if the action fails with @EWOULDBLOCK@ + -- or similar. + , throwSocketErrorWaitRead + , throwSocketErrorWaitWrite + + -- * Initialization + , withSocketsDo + + -- * Low-level helpers + , zeroMemory + ) where + +import Foreign.C.Error (throwErrno, throwErrnoIfMinus1Retry, + throwErrnoIfMinus1RetryMayBlock, throwErrnoIfMinus1_, + Errno(..), errnoToIOError) +#if defined(HAVE_WINSOCK2_H) +import Foreign.C.String (peekCString) +import Foreign.Ptr (Ptr) +#endif +import Foreign.C.Types (CInt(..)) +import GHC.Conc (threadWaitRead, threadWaitWrite) + +#if defined(HAVE_WINSOCK2_H) +import Control.Exception ( evaluate ) +import System.IO.Unsafe ( unsafePerformIO ) +import Control.Monad ( when ) +# if __GLASGOW_HASKELL__ >= 707 +import GHC.IO.Exception ( IOErrorType(..) ) +# else +import GHC.IOBase ( IOErrorType(..) ) +# endif +import Foreign.C.Types ( CChar ) +import System.IO.Error ( ioeSetErrorString, mkIOError ) +#endif + +import Network.Socket.Types + +-- --------------------------------------------------------------------- +-- Guards for socket operations that may fail + +-- | Throw an 'IOError' corresponding to the current socket error. +throwSocketError :: String -- ^ textual description of the error location + -> IO a + +-- | Like 'throwSocketError', but the error code is supplied as an argument. +-- +-- On Windows, do not use errno. Use a system error code instead. +throwSocketErrorCode :: String -> CInt -> IO a + +-- | Throw an 'IOError' corresponding to the current socket error if +-- the IO action returns a result of @-1@. Discards the result of the +-- IO action after error handling. +throwSocketErrorIfMinus1_ + :: (Eq a, Num a) + => String -- ^ textual description of the location + -> IO a -- ^ the 'IO' operation to be executed + -> IO () + +{-# SPECIALIZE throwSocketErrorIfMinus1_ :: String -> IO CInt -> IO () #-} + +-- | Throw an 'IOError' corresponding to the current socket error if +-- the IO action returns a result of @-1@, but retries in case of an +-- interrupted operation. +throwSocketErrorIfMinus1Retry + :: (Eq a, Num a) + => String -- ^ textual description of the location + -> IO a -- ^ the 'IO' operation to be executed + -> IO a + +{-# SPECIALIZE throwSocketErrorIfMinus1Retry :: String -> IO CInt -> IO CInt #-} + +-- | Throw an 'IOError' corresponding to the current socket error if +-- the IO action returns a result of @-1@, but retries in case of an +-- interrupted operation. Discards the result of the IO action after +-- error handling. +throwSocketErrorIfMinus1Retry_ + :: (Eq a, Num a) + => String -- ^ textual description of the location + -> IO a -- ^ the 'IO' operation to be executed + -> IO () +throwSocketErrorIfMinus1Retry_ loc m = + throwSocketErrorIfMinus1Retry loc m >> return () +{-# SPECIALIZE throwSocketErrorIfMinus1Retry_ :: String -> IO CInt -> IO () #-} + +-- | Throw an 'IOError' corresponding to the current socket error if +-- the IO action returns a result of @-1@, but retries in case of an +-- interrupted operation. Checks for operations that would block and +-- executes an alternative action before retrying in that case. +throwSocketErrorIfMinus1RetryMayBlock + :: (Eq a, Num a) + => String -- ^ textual description of the location + -> IO b -- ^ action to execute before retrying if an + -- immediate retry would block + -> IO a -- ^ the 'IO' operation to be executed + -> IO a + +{-# SPECIALIZE throwSocketErrorIfMinus1RetryMayBlock + :: String -> IO b -> IO CInt -> IO CInt #-} + +#if (!defined(HAVE_WINSOCK2_H)) + +throwSocketErrorIfMinus1RetryMayBlock name on_block act = + throwErrnoIfMinus1RetryMayBlock name act on_block + +throwSocketErrorIfMinus1Retry = throwErrnoIfMinus1Retry + +throwSocketErrorIfMinus1_ = throwErrnoIfMinus1_ + +throwSocketError = throwErrno + +throwSocketErrorCode loc errno = + ioError (errnoToIOError loc (Errno errno) Nothing Nothing) + +#else + +throwSocketErrorIfMinus1RetryMayBlock name _ act + = throwSocketErrorIfMinus1Retry name act + +throwSocketErrorIfMinus1_ name act = do + throwSocketErrorIfMinus1Retry name act + return () + +# if defined(HAVE_WINSOCK2_H) +throwSocketErrorIfMinus1Retry name act = do + r <- act + if (r == -1) + then do + rc <- c_getLastError + case rc of + #{const WSANOTINITIALISED} -> do + withSocketsDo (return ()) + r <- act + if (r == -1) + then throwSocketError name + else return r + _ -> throwSocketError name + else return r + +throwSocketErrorCode name rc = do + pstr <- c_getWSError rc + str <- peekCString pstr + ioError (ioeSetErrorString (mkIOError OtherError name Nothing Nothing) str) + +throwSocketError name = + c_getLastError >>= throwSocketErrorCode name + +foreign import CALLCONV unsafe "WSAGetLastError" + c_getLastError :: IO CInt + +foreign import ccall unsafe "getWSErrorDescr" + c_getWSError :: CInt -> IO (Ptr CChar) + + +# else +throwSocketErrorIfMinus1Retry = throwErrnoIfMinus1Retry +throwSocketError = throwErrno +throwSocketErrorCode loc errno = + ioError (errnoToIOError loc (Errno errno) Nothing Nothing) +# endif +#endif + +-- | Like 'throwSocketErrorIfMinus1Retry', but if the action fails with +-- @EWOULDBLOCK@ or similar, wait for the socket to be read-ready, +-- and try again. +throwSocketErrorWaitRead :: (Eq a, Num a) => Socket -> String -> IO a -> IO a +throwSocketErrorWaitRead sock name io = + throwSocketErrorIfMinus1RetryMayBlock name + (threadWaitRead $ fromIntegral $ fdSocket sock) + io + +-- | Like 'throwSocketErrorIfMinus1Retry', but if the action fails with +-- @EWOULDBLOCK@ or similar, wait for the socket to be write-ready, +-- and try again. +throwSocketErrorWaitWrite :: (Eq a, Num a) => Socket -> String -> IO a -> IO a +throwSocketErrorWaitWrite sock name io = + throwSocketErrorIfMinus1RetryMayBlock name + (threadWaitWrite $ fromIntegral $ fdSocket sock) + io + +-- --------------------------------------------------------------------------- +-- WinSock support + +{-| With older versions of the @network@ library (version 2.6.0.2 or earlier) +on Windows operating systems, +the networking subsystem must be initialised using 'withSocketsDo' before +any networking operations can be used. eg. + +> main = withSocketsDo $ do {...} + +It is fine to nest calls to 'withSocketsDo', and to perform networking operations +after 'withSocketsDo' has returned. + +In newer versions of the @network@ library (version v2.6.1.0 or later) +it is only necessary to call +'withSocketsDo' if you are calling the 'MkSocket' constructor directly. +However, for compatibility with older versions on Windows, it is good practice +to always call 'withSocketsDo' (it's very cheap). +-} +{-# INLINE withSocketsDo #-} +withSocketsDo :: IO a -> IO a +#if !defined(WITH_WINSOCK) +withSocketsDo x = x +#else +withSocketsDo act = evaluate withSocketsInit >> act + + +{-# NOINLINE withSocketsInit #-} +withSocketsInit :: () +-- Use a CAF to make forcing it do initialisation once, but subsequent forces will be cheap +withSocketsInit = unsafePerformIO $ do + x <- initWinSock + when (x /= 0) $ ioError $ + userError "Network.Socket.Internal.withSocketsDo: Failed to initialise WinSock" + +foreign import ccall unsafe "initWinSock" initWinSock :: IO Int + +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/Types.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/Types.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket/Types.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket/Types.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,1110 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +#include "HsNet.h" +##include "HsNetDef.h" + +module Network.Socket.Types + ( + -- * Socket + Socket(..) + , fdSocket + , sockFamily + , sockType + , sockProtocol + , sockStatus + , SocketStatus(..) + + -- * Socket types + , SocketType(..) + , isSupportedSocketType + , packSocketType + , packSocketType' + , packSocketTypeOrThrow + , unpackSocketType + , unpackSocketType' + + -- * Family + , Family(..) + , isSupportedFamily + , packFamily + , unpackFamily + + -- * Socket addresses + , SockAddr(..) + , isSupportedSockAddr + , HostAddress + , hostAddressToTuple + , tupleToHostAddress +#if defined(IPV6_SOCKET_SUPPORT) + , HostAddress6 + , hostAddress6ToTuple + , tupleToHostAddress6 + , FlowInfo + , ScopeID +#endif + , peekSockAddr + , pokeSockAddr + , sizeOfSockAddr + , sizeOfSockAddrByFamily + , withSockAddr + , withNewSockAddr + + -- * Unsorted + , ProtocolNumber + , PortNumber(..) + + -- * Low-level helpers + , zeroMemory + ) where + +import Control.Concurrent.MVar +import Control.Monad +import Data.Bits +import Data.Maybe +import Data.Typeable +import Data.Word +import Data.Int +import Foreign.C +import Foreign.Marshal.Alloc +import Foreign.Marshal.Array +import Foreign.Ptr +import Foreign.Storable + +-- | A socket data type. +-- 'Socket's are not GCed unless they are closed by 'close'. +data Socket + = MkSocket + CInt -- File Descriptor + Family + SocketType + ProtocolNumber -- Protocol Number + (MVar SocketStatus) -- Status Flag + deriving Typeable + +{-# DEPRECATED MkSocket "'MkSocket' will not be available in version 3.0.0.0 or later. Use fdSocket instead" #-} + +-- | Obtaining the file descriptor from a socket. +-- +-- If a 'Socket' is shared with multiple threads and +-- one uses 'fdSocket', unexpected issues may happen. +-- Consider the following scenario: +-- +-- 1) Thread A acquires a 'Fd' from 'Socket' by 'fdSocket'. +-- +-- 2) Thread B close the 'Socket'. +-- +-- 3) Thread C opens a new 'Socket'. Unfortunately it gets the same 'Fd' +-- number which thread A is holding. +-- +-- In this case, it is safer for Thread A to clone 'Fd' by +-- 'System.Posix.IO.dup'. But this would still suffer from +-- a rase condition between 'fdSocket' and 'close'. +fdSocket :: Socket -> CInt +fdSocket (MkSocket fd _ _ _ _) = fd + +sockFamily :: Socket -> Family +sockFamily (MkSocket _ f _ _ _) = f + +sockType :: Socket -> SocketType +sockType (MkSocket _ _ t _ _) = t + +sockProtocol :: Socket -> ProtocolNumber +sockProtocol (MkSocket _ _ _ p _) = p + +sockStatus :: Socket -> MVar SocketStatus +sockStatus (MkSocket _ _ _ _ s) = s + +instance Eq Socket where + (MkSocket _ _ _ _ m1) == (MkSocket _ _ _ _ m2) = m1 == m2 + +instance Show Socket where + showsPrec _n (MkSocket fd _ _ _ _) = + showString "" + +type ProtocolNumber = CInt + +-- | The status of the socket as /determined by this library/, not +-- necessarily reflecting the state of the connection itself. +-- +-- For example, the 'Closed' status is applied when the 'close' +-- function is called. +data SocketStatus + -- Returned Status Function called + = NotConnected -- ^ Newly created, unconnected socket + | Bound -- ^ Bound, via 'bind' + | Listening -- ^ Listening, via 'listen' + | Connected -- ^ Connected or accepted, via 'connect' or 'accept' + | ConvertedToHandle -- ^ Is now a 'Handle' (via 'socketToHandle'), don't touch + | Closed -- ^ Closed was closed by 'close' + deriving (Eq, Show, Typeable) + +{-# DEPRECATED SocketStatus "SocketStatus will be removed" #-} + +----------------------------------------------------------------------------- +-- Socket types + +-- There are a few possible ways to do this. The first is convert the +-- structs used in the C library into an equivalent Haskell type. An +-- other possible implementation is to keep all the internals in the C +-- code and use an Int## and a status flag. The second method is used +-- here since a lot of the C structures are not required to be +-- manipulated. + +-- Originally the status was non-mutable so we had to return a new +-- socket each time we changed the status. This version now uses +-- mutable variables to avoid the need to do this. The result is a +-- cleaner interface and better security since the application +-- programmer now can't circumvent the status information to perform +-- invalid operations on sockets. + +-- | Socket Types. +-- +-- The existence of a constructor does not necessarily imply that that +-- socket type is supported on your system: see 'isSupportedSocketType'. +data SocketType + = NoSocketType -- ^ 0, used in getAddrInfo hints, for example + | Stream -- ^ SOCK_STREAM + | Datagram -- ^ SOCK_DGRAM + | Raw -- ^ SOCK_RAW + | RDM -- ^ SOCK_RDM + | SeqPacket -- ^ SOCK_SEQPACKET + deriving (Eq, Ord, Read, Show, Typeable) + +-- | Does the SOCK_ constant corresponding to the given SocketType exist on +-- this system? +isSupportedSocketType :: SocketType -> Bool +isSupportedSocketType = isJust . packSocketType' + +-- | Find the SOCK_ constant corresponding to the SocketType value. +packSocketType' :: SocketType -> Maybe CInt +packSocketType' stype = case Just stype of + -- the Just above is to disable GHC's overlapping pattern + -- detection: see comments for packSocketOption + Just NoSocketType -> Just 0 +#ifdef SOCK_STREAM + Just Stream -> Just #const SOCK_STREAM +#endif +#ifdef SOCK_DGRAM + Just Datagram -> Just #const SOCK_DGRAM +#endif +#ifdef SOCK_RAW + Just Raw -> Just #const SOCK_RAW +#endif +#ifdef SOCK_RDM + Just RDM -> Just #const SOCK_RDM +#endif +#ifdef SOCK_SEQPACKET + Just SeqPacket -> Just #const SOCK_SEQPACKET +#endif + _ -> Nothing + +{-# DEPRECATED packSocketType "packSocketType will not be available in version 3.0.0.0 or later." #-} + +packSocketType :: SocketType -> CInt +packSocketType stype = fromMaybe (error errMsg) (packSocketType' stype) + where + errMsg = concat ["Network.Socket.packSocketType: ", + "socket type ", show stype, " unsupported on this system"] + +-- | Try packSocketType' on the SocketType, if it fails throw an error with +-- message starting "Network.Socket." ++ the String parameter +packSocketTypeOrThrow :: String -> SocketType -> IO CInt +packSocketTypeOrThrow caller stype = maybe err return (packSocketType' stype) + where + err = ioError . userError . concat $ ["Network.Socket.", caller, ": ", + "socket type ", show stype, " unsupported on this system"] + + +unpackSocketType:: CInt -> Maybe SocketType +unpackSocketType t = case t of + 0 -> Just NoSocketType +#ifdef SOCK_STREAM + (#const SOCK_STREAM) -> Just Stream +#endif +#ifdef SOCK_DGRAM + (#const SOCK_DGRAM) -> Just Datagram +#endif +#ifdef SOCK_RAW + (#const SOCK_RAW) -> Just Raw +#endif +#ifdef SOCK_RDM + (#const SOCK_RDM) -> Just RDM +#endif +#ifdef SOCK_SEQPACKET + (#const SOCK_SEQPACKET) -> Just SeqPacket +#endif + _ -> Nothing + +-- | Try unpackSocketType on the CInt, if it fails throw an error with +-- message starting "Network.Socket." ++ the String parameter +unpackSocketType' :: String -> CInt -> IO SocketType +unpackSocketType' caller ty = maybe err return (unpackSocketType ty) + where + err = ioError . userError . concat $ ["Network.Socket.", caller, ": ", + "socket type ", show ty, " unsupported on this system"] + +------------------------------------------------------------------------ +-- Protocol Families. + +-- | Address families. +-- +-- A constructor being present here does not mean it is supported by the +-- operating system: see 'isSupportedFamily'. +data Family + = AF_UNSPEC -- unspecified + | AF_UNIX -- local to host (pipes, portals + | AF_INET -- internetwork: UDP, TCP, etc + | AF_INET6 -- Internet Protocol version 6 + | AF_IMPLINK -- arpanet imp addresses + | AF_PUP -- pup protocols: e.g. BSP + | AF_CHAOS -- mit CHAOS protocols + | AF_NS -- XEROX NS protocols + | AF_NBS -- nbs protocols + | AF_ECMA -- european computer manufacturers + | AF_DATAKIT -- datakit protocols + | AF_CCITT -- CCITT protocols, X.25 etc + | AF_SNA -- IBM SNA + | AF_DECnet -- DECnet + | AF_DLI -- Direct data link interface + | AF_LAT -- LAT + | AF_HYLINK -- NSC Hyperchannel + | AF_APPLETALK -- Apple Talk + | AF_ROUTE -- Internal Routing Protocol (aka AF_NETLINK) + | AF_NETBIOS -- NetBios-style addresses + | AF_NIT -- Network Interface Tap + | AF_802 -- IEEE 802.2, also ISO 8802 + | AF_ISO -- ISO protocols + | AF_OSI -- umbrella of all families used by OSI + | AF_NETMAN -- DNA Network Management + | AF_X25 -- CCITT X.25 + | AF_AX25 + | AF_OSINET -- AFI + | AF_GOSSIP -- US Government OSI + | AF_IPX -- Novell Internet Protocol + | Pseudo_AF_XTP -- eXpress Transfer Protocol (no AF) + | AF_CTF -- Common Trace Facility + | AF_WAN -- Wide Area Network protocols + | AF_SDL -- SGI Data Link for DLPI + | AF_NETWARE + | AF_NDD + | AF_INTF -- Debugging use only + | AF_COIP -- connection-oriented IP, aka ST II + | AF_CNT -- Computer Network Technology + | Pseudo_AF_RTIP -- Help Identify RTIP packets + | Pseudo_AF_PIP -- Help Identify PIP packets + | AF_SIP -- Simple Internet Protocol + | AF_ISDN -- Integrated Services Digital Network + | Pseudo_AF_KEY -- Internal key-management function + | AF_NATM -- native ATM access + | AF_ARP -- (rev.) addr. res. prot. (RFC 826) + | Pseudo_AF_HDRCMPLT -- Used by BPF to not rewrite hdrs in iface output + | AF_ENCAP + | AF_LINK -- Link layer interface + | AF_RAW -- Link layer interface + | AF_RIF -- raw interface + | AF_NETROM -- Amateur radio NetROM + | AF_BRIDGE -- multiprotocol bridge + | AF_ATMPVC -- ATM PVCs + | AF_ROSE -- Amateur Radio X.25 PLP + | AF_NETBEUI -- 802.2LLC + | AF_SECURITY -- Security callback pseudo AF + | AF_PACKET -- Packet family + | AF_ASH -- Ash + | AF_ECONET -- Acorn Econet + | AF_ATMSVC -- ATM SVCs + | AF_IRDA -- IRDA sockets + | AF_PPPOX -- PPPoX sockets + | AF_WANPIPE -- Wanpipe API sockets + | AF_BLUETOOTH -- bluetooth sockets + | AF_CAN -- Controller Area Network + deriving (Eq, Ord, Read, Show) + +packFamily :: Family -> CInt +packFamily f = case packFamily' f of + Just fam -> fam + Nothing -> error $ + "Network.Socket.packFamily: unsupported address family: " ++ + show f + +-- | Does the AF_ constant corresponding to the given family exist on this +-- system? +isSupportedFamily :: Family -> Bool +isSupportedFamily = isJust . packFamily' + +packFamily' :: Family -> Maybe CInt +packFamily' f = case Just f of + -- the Just above is to disable GHC's overlapping pattern + -- detection: see comments for packSocketOption + Just AF_UNSPEC -> Just #const AF_UNSPEC +#ifdef AF_UNIX + Just AF_UNIX -> Just #const AF_UNIX +#endif +#ifdef AF_INET + Just AF_INET -> Just #const AF_INET +#endif +#ifdef AF_INET6 + Just AF_INET6 -> Just #const AF_INET6 +#endif +#ifdef AF_IMPLINK + Just AF_IMPLINK -> Just #const AF_IMPLINK +#endif +#ifdef AF_PUP + Just AF_PUP -> Just #const AF_PUP +#endif +#ifdef AF_CHAOS + Just AF_CHAOS -> Just #const AF_CHAOS +#endif +#ifdef AF_NS + Just AF_NS -> Just #const AF_NS +#endif +#ifdef AF_NBS + Just AF_NBS -> Just #const AF_NBS +#endif +#ifdef AF_ECMA + Just AF_ECMA -> Just #const AF_ECMA +#endif +#ifdef AF_DATAKIT + Just AF_DATAKIT -> Just #const AF_DATAKIT +#endif +#ifdef AF_CCITT + Just AF_CCITT -> Just #const AF_CCITT +#endif +#ifdef AF_SNA + Just AF_SNA -> Just #const AF_SNA +#endif +#ifdef AF_DECnet + Just AF_DECnet -> Just #const AF_DECnet +#endif +#ifdef AF_DLI + Just AF_DLI -> Just #const AF_DLI +#endif +#ifdef AF_LAT + Just AF_LAT -> Just #const AF_LAT +#endif +#ifdef AF_HYLINK + Just AF_HYLINK -> Just #const AF_HYLINK +#endif +#ifdef AF_APPLETALK + Just AF_APPLETALK -> Just #const AF_APPLETALK +#endif +#ifdef AF_ROUTE + Just AF_ROUTE -> Just #const AF_ROUTE +#endif +#ifdef AF_NETBIOS + Just AF_NETBIOS -> Just #const AF_NETBIOS +#endif +#ifdef AF_NIT + Just AF_NIT -> Just #const AF_NIT +#endif +#ifdef AF_802 + Just AF_802 -> Just #const AF_802 +#endif +#ifdef AF_ISO + Just AF_ISO -> Just #const AF_ISO +#endif +#ifdef AF_OSI + Just AF_OSI -> Just #const AF_OSI +#endif +#ifdef AF_NETMAN + Just AF_NETMAN -> Just #const AF_NETMAN +#endif +#ifdef AF_X25 + Just AF_X25 -> Just #const AF_X25 +#endif +#ifdef AF_AX25 + Just AF_AX25 -> Just #const AF_AX25 +#endif +#ifdef AF_OSINET + Just AF_OSINET -> Just #const AF_OSINET +#endif +#ifdef AF_GOSSIP + Just AF_GOSSIP -> Just #const AF_GOSSIP +#endif +#ifdef AF_IPX + Just AF_IPX -> Just #const AF_IPX +#endif +#ifdef Pseudo_AF_XTP + Just Pseudo_AF_XTP -> Just #const Pseudo_AF_XTP +#endif +#ifdef AF_CTF + Just AF_CTF -> Just #const AF_CTF +#endif +#ifdef AF_WAN + Just AF_WAN -> Just #const AF_WAN +#endif +#ifdef AF_SDL + Just AF_SDL -> Just #const AF_SDL +#endif +#ifdef AF_NETWARE + Just AF_NETWARE -> Just #const AF_NETWARE +#endif +#ifdef AF_NDD + Just AF_NDD -> Just #const AF_NDD +#endif +#ifdef AF_INTF + Just AF_INTF -> Just #const AF_INTF +#endif +#ifdef AF_COIP + Just AF_COIP -> Just #const AF_COIP +#endif +#ifdef AF_CNT + Just AF_CNT -> Just #const AF_CNT +#endif +#ifdef Pseudo_AF_RTIP + Just Pseudo_AF_RTIP -> Just #const Pseudo_AF_RTIP +#endif +#ifdef Pseudo_AF_PIP + Just Pseudo_AF_PIP -> Just #const Pseudo_AF_PIP +#endif +#ifdef AF_SIP + Just AF_SIP -> Just #const AF_SIP +#endif +#ifdef AF_ISDN + Just AF_ISDN -> Just #const AF_ISDN +#endif +#ifdef Pseudo_AF_KEY + Just Pseudo_AF_KEY -> Just #const Pseudo_AF_KEY +#endif +#ifdef AF_NATM + Just AF_NATM -> Just #const AF_NATM +#endif +#ifdef AF_ARP + Just AF_ARP -> Just #const AF_ARP +#endif +#ifdef Pseudo_AF_HDRCMPLT + Just Pseudo_AF_HDRCMPLT -> Just #const Pseudo_AF_HDRCMPLT +#endif +#ifdef AF_ENCAP + Just AF_ENCAP -> Just #const AF_ENCAP +#endif +#ifdef AF_LINK + Just AF_LINK -> Just #const AF_LINK +#endif +#ifdef AF_RAW + Just AF_RAW -> Just #const AF_RAW +#endif +#ifdef AF_RIF + Just AF_RIF -> Just #const AF_RIF +#endif +#ifdef AF_NETROM + Just AF_NETROM -> Just #const AF_NETROM +#endif +#ifdef AF_BRIDGE + Just AF_BRIDGE -> Just #const AF_BRIDGE +#endif +#ifdef AF_ATMPVC + Just AF_ATMPVC -> Just #const AF_ATMPVC +#endif +#ifdef AF_ROSE + Just AF_ROSE -> Just #const AF_ROSE +#endif +#ifdef AF_NETBEUI + Just AF_NETBEUI -> Just #const AF_NETBEUI +#endif +#ifdef AF_SECURITY + Just AF_SECURITY -> Just #const AF_SECURITY +#endif +#ifdef AF_PACKET + Just AF_PACKET -> Just #const AF_PACKET +#endif +#ifdef AF_ASH + Just AF_ASH -> Just #const AF_ASH +#endif +#ifdef AF_ECONET + Just AF_ECONET -> Just #const AF_ECONET +#endif +#ifdef AF_ATMSVC + Just AF_ATMSVC -> Just #const AF_ATMSVC +#endif +#ifdef AF_IRDA + Just AF_IRDA -> Just #const AF_IRDA +#endif +#ifdef AF_PPPOX + Just AF_PPPOX -> Just #const AF_PPPOX +#endif +#ifdef AF_WANPIPE + Just AF_WANPIPE -> Just #const AF_WANPIPE +#endif +#ifdef AF_BLUETOOTH + Just AF_BLUETOOTH -> Just #const AF_BLUETOOTH +#endif +#ifdef AF_CAN + Just AF_CAN -> Just #const AF_CAN +#endif + _ -> Nothing + +--------- ---------- + +unpackFamily :: CInt -> Family +unpackFamily f = case f of + (#const AF_UNSPEC) -> AF_UNSPEC +#ifdef AF_UNIX + (#const AF_UNIX) -> AF_UNIX +#endif +#ifdef AF_INET + (#const AF_INET) -> AF_INET +#endif +#ifdef AF_INET6 + (#const AF_INET6) -> AF_INET6 +#endif +#ifdef AF_IMPLINK + (#const AF_IMPLINK) -> AF_IMPLINK +#endif +#ifdef AF_PUP + (#const AF_PUP) -> AF_PUP +#endif +#ifdef AF_CHAOS + (#const AF_CHAOS) -> AF_CHAOS +#endif +#ifdef AF_NS + (#const AF_NS) -> AF_NS +#endif +#ifdef AF_NBS + (#const AF_NBS) -> AF_NBS +#endif +#ifdef AF_ECMA + (#const AF_ECMA) -> AF_ECMA +#endif +#ifdef AF_DATAKIT + (#const AF_DATAKIT) -> AF_DATAKIT +#endif +#ifdef AF_CCITT + (#const AF_CCITT) -> AF_CCITT +#endif +#ifdef AF_SNA + (#const AF_SNA) -> AF_SNA +#endif +#ifdef AF_DECnet + (#const AF_DECnet) -> AF_DECnet +#endif +#ifdef AF_DLI + (#const AF_DLI) -> AF_DLI +#endif +#ifdef AF_LAT + (#const AF_LAT) -> AF_LAT +#endif +#ifdef AF_HYLINK + (#const AF_HYLINK) -> AF_HYLINK +#endif +#ifdef AF_APPLETALK + (#const AF_APPLETALK) -> AF_APPLETALK +#endif +#ifdef AF_ROUTE + (#const AF_ROUTE) -> AF_ROUTE +#endif +#ifdef AF_NETBIOS + (#const AF_NETBIOS) -> AF_NETBIOS +#endif +#ifdef AF_NIT + (#const AF_NIT) -> AF_NIT +#endif +#ifdef AF_802 + (#const AF_802) -> AF_802 +#endif +#ifdef AF_ISO + (#const AF_ISO) -> AF_ISO +#endif +#ifdef AF_OSI +# if (!defined(AF_ISO)) || (defined(AF_ISO) && (AF_ISO != AF_OSI)) + (#const AF_OSI) -> AF_OSI +# endif +#endif +#ifdef AF_NETMAN + (#const AF_NETMAN) -> AF_NETMAN +#endif +#ifdef AF_X25 + (#const AF_X25) -> AF_X25 +#endif +#ifdef AF_AX25 + (#const AF_AX25) -> AF_AX25 +#endif +#ifdef AF_OSINET + (#const AF_OSINET) -> AF_OSINET +#endif +#ifdef AF_GOSSIP + (#const AF_GOSSIP) -> AF_GOSSIP +#endif +#if defined(AF_IPX) && (!defined(AF_NS) || AF_NS != AF_IPX) + (#const AF_IPX) -> AF_IPX +#endif +#ifdef Pseudo_AF_XTP + (#const Pseudo_AF_XTP) -> Pseudo_AF_XTP +#endif +#ifdef AF_CTF + (#const AF_CTF) -> AF_CTF +#endif +#ifdef AF_WAN + (#const AF_WAN) -> AF_WAN +#endif +#ifdef AF_SDL + (#const AF_SDL) -> AF_SDL +#endif +#ifdef AF_NETWARE + (#const AF_NETWARE) -> AF_NETWARE +#endif +#ifdef AF_NDD + (#const AF_NDD) -> AF_NDD +#endif +#ifdef AF_INTF + (#const AF_INTF) -> AF_INTF +#endif +#ifdef AF_COIP + (#const AF_COIP) -> AF_COIP +#endif +#ifdef AF_CNT + (#const AF_CNT) -> AF_CNT +#endif +#ifdef Pseudo_AF_RTIP + (#const Pseudo_AF_RTIP) -> Pseudo_AF_RTIP +#endif +#ifdef Pseudo_AF_PIP + (#const Pseudo_AF_PIP) -> Pseudo_AF_PIP +#endif +#ifdef AF_SIP + (#const AF_SIP) -> AF_SIP +#endif +#ifdef AF_ISDN + (#const AF_ISDN) -> AF_ISDN +#endif +#ifdef Pseudo_AF_KEY + (#const Pseudo_AF_KEY) -> Pseudo_AF_KEY +#endif +#ifdef AF_NATM + (#const AF_NATM) -> AF_NATM +#endif +#ifdef AF_ARP + (#const AF_ARP) -> AF_ARP +#endif +#ifdef Pseudo_AF_HDRCMPLT + (#const Pseudo_AF_HDRCMPLT) -> Pseudo_AF_HDRCMPLT +#endif +#ifdef AF_ENCAP + (#const AF_ENCAP) -> AF_ENCAP +#endif +#ifdef AF_LINK + (#const AF_LINK) -> AF_LINK +#endif +#ifdef AF_RAW + (#const AF_RAW) -> AF_RAW +#endif +#ifdef AF_RIF + (#const AF_RIF) -> AF_RIF +#endif +#ifdef AF_NETROM + (#const AF_NETROM) -> AF_NETROM +#endif +#ifdef AF_BRIDGE + (#const AF_BRIDGE) -> AF_BRIDGE +#endif +#ifdef AF_ATMPVC + (#const AF_ATMPVC) -> AF_ATMPVC +#endif +#ifdef AF_ROSE + (#const AF_ROSE) -> AF_ROSE +#endif +#ifdef AF_NETBEUI + (#const AF_NETBEUI) -> AF_NETBEUI +#endif +#ifdef AF_SECURITY + (#const AF_SECURITY) -> AF_SECURITY +#endif +#ifdef AF_PACKET + (#const AF_PACKET) -> AF_PACKET +#endif +#ifdef AF_ASH + (#const AF_ASH) -> AF_ASH +#endif +#ifdef AF_ECONET + (#const AF_ECONET) -> AF_ECONET +#endif +#ifdef AF_ATMSVC + (#const AF_ATMSVC) -> AF_ATMSVC +#endif +#ifdef AF_IRDA + (#const AF_IRDA) -> AF_IRDA +#endif +#ifdef AF_PPPOX + (#const AF_PPPOX) -> AF_PPPOX +#endif +#ifdef AF_WANPIPE + (#const AF_WANPIPE) -> AF_WANPIPE +#endif +#ifdef AF_BLUETOOTH + (#const AF_BLUETOOTH) -> AF_BLUETOOTH +#endif +#ifdef AF_CAN + (#const AF_CAN) -> AF_CAN +#endif + unknown -> error $ + "Network.Socket.Types.unpackFamily: unknown address family: " ++ + show unknown + +------------------------------------------------------------------------ +-- Port Numbers + +-- | Use the @Num@ instance (i.e. use a literal) to create a +-- @PortNumber@ value. +-- +-- >>> 1 :: PortNumber +-- 1 +-- >>> read "1" :: PortNumber +-- 1 +-- >>> show (12345 :: PortNumber) +-- "12345" +-- >>> 50000 < (51000 :: PortNumber) +-- True +-- >>> 50000 < (52000 :: PortNumber) +-- True +-- >>> 50000 + (10000 :: PortNumber) +-- 60000 +newtype PortNumber = PortNum Word16 deriving (Eq, Ord, Typeable, Num, Enum, Real, Integral) + +-- Print "n" instead of "PortNum n". +instance Show PortNumber where + showsPrec p (PortNum pn) = showsPrec p (fromIntegral pn :: Int) + +-- Read "n" instead of "PortNum n". +instance Read PortNumber where + readsPrec n = map (\(x,y) -> (fromIntegral (x :: Int), y)) . readsPrec n + +foreign import CALLCONV unsafe "ntohs" ntohs :: Word16 -> Word16 +foreign import CALLCONV unsafe "htons" htons :: Word16 -> Word16 +foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32 +foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32 + +instance Storable PortNumber where + sizeOf _ = sizeOf (undefined :: Word16) + alignment _ = alignment (undefined :: Word16) + poke p (PortNum po) = poke (castPtr p) (htons po) + peek p = (PortNum . ntohs) `liftM` peek (castPtr p) + +------------------------------------------------------------------------ +-- Socket addresses + +-- The scheme used for addressing sockets is somewhat quirky. The +-- calls in the BSD socket API that need to know the socket address +-- all operate in terms of struct sockaddr, a `virtual' type of +-- socket address. + +-- The Internet family of sockets are addressed as struct sockaddr_in, +-- so when calling functions that operate on struct sockaddr, we have +-- to type cast the Internet socket address into a struct sockaddr. +-- Instances of the structure for different families might *not* be +-- the same size. Same casting is required of other families of +-- sockets such as Xerox NS. Similarly for UNIX-domain sockets. + +-- To represent these socket addresses in Haskell-land, we do what BSD +-- didn't do, and use a union/algebraic type for the different +-- families. Currently only UNIX-domain sockets and the Internet +-- families are supported. + +#if defined(IPV6_SOCKET_SUPPORT) +type FlowInfo = Word32 +type ScopeID = Word32 +#endif + +-- | The existence of a constructor does not necessarily imply that +-- that socket address type is supported on your system: see +-- 'isSupportedSockAddr'. +data SockAddr -- C Names + = SockAddrInet + PortNumber -- sin_port + HostAddress -- sin_addr (ditto) + | SockAddrInet6 + PortNumber -- sin6_port + FlowInfo -- sin6_flowinfo (ditto) + HostAddress6 -- sin6_addr (ditto) + ScopeID -- sin6_scope_id (ditto) + | SockAddrUnix + String -- sun_path + | SockAddrCan + Int32 -- can_ifindex (can be get by Network.BSD.ifNameToIndex "can0") + -- TODO: Extend this to include transport protocol information + deriving (Eq, Ord, Typeable) + +-- | Is the socket address type supported on this system? +isSupportedSockAddr :: SockAddr -> Bool +isSupportedSockAddr addr = case addr of + SockAddrInet {} -> True +#if defined(IPV6_SOCKET_SUPPORT) + SockAddrInet6 {} -> True +#endif +#if defined(DOMAIN_SOCKET_SUPPORT) + SockAddrUnix{} -> True +#endif +#if defined(CAN_SOCKET_SUPPORT) + SockAddrCan{} -> True +#endif +#if !(defined(IPV6_SOCKET_SUPPORT) \ + && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) + _ -> False +#endif + +{-# DEPRECATED SockAddrCan "This will be removed in 3.0" #-} + +#if defined(WITH_WINSOCK) +type CSaFamily = (#type unsigned short) +#elif defined(darwin_HOST_OS) +type CSaFamily = (#type u_char) +#else +type CSaFamily = (#type sa_family_t) +#endif + +-- | Computes the storage requirements (in bytes) of the given +-- 'SockAddr'. This function differs from 'Foreign.Storable.sizeOf' +-- in that the value of the argument /is/ used. +sizeOfSockAddr :: SockAddr -> Int +#if defined(DOMAIN_SOCKET_SUPPORT) +sizeOfSockAddr (SockAddrUnix path) = + case path of + '\0':_ -> (#const sizeof(sa_family_t)) + length path + _ -> #const sizeof(struct sockaddr_un) +#endif +sizeOfSockAddr (SockAddrInet _ _) = #const sizeof(struct sockaddr_in) +#if defined(IPV6_SOCKET_SUPPORT) +sizeOfSockAddr (SockAddrInet6 _ _ _ _) = #const sizeof(struct sockaddr_in6) +#endif +#if defined(CAN_SOCKET_SUPPORT) +sizeOfSockAddr (SockAddrCan _) = #const sizeof(struct sockaddr_can) +#endif +#if !(defined(IPV6_SOCKET_SUPPORT) \ + && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) +sizeOfSockAddr _ = error "sizeOfSockAddr: not supported" +#endif + +-- | Computes the storage requirements (in bytes) required for a +-- 'SockAddr' with the given 'Family'. +sizeOfSockAddrByFamily :: Family -> Int +#if defined(DOMAIN_SOCKET_SUPPORT) +sizeOfSockAddrByFamily AF_UNIX = #const sizeof(struct sockaddr_un) +#endif +#if defined(IPV6_SOCKET_SUPPORT) +sizeOfSockAddrByFamily AF_INET6 = #const sizeof(struct sockaddr_in6) +#endif +sizeOfSockAddrByFamily AF_INET = #const sizeof(struct sockaddr_in) +#if defined(CAN_SOCKET_SUPPORT) +sizeOfSockAddrByFamily AF_CAN = #const sizeof(struct sockaddr_can) +#endif +sizeOfSockAddrByFamily family = error $ + "Network.Socket.Types.sizeOfSockAddrByFamily: address family '" ++ + show family ++ "' not supported." + +-- | Use a 'SockAddr' with a function requiring a pointer to a +-- 'SockAddr' and the length of that 'SockAddr'. +withSockAddr :: SockAddr -> (Ptr SockAddr -> Int -> IO a) -> IO a +withSockAddr addr f = do + let sz = sizeOfSockAddr addr + allocaBytes sz $ \p -> pokeSockAddr p addr >> f (castPtr p) sz + +-- | Create a new 'SockAddr' for use with a function requiring a +-- pointer to a 'SockAddr' and the length of that 'SockAddr'. +withNewSockAddr :: Family -> (Ptr SockAddr -> Int -> IO a) -> IO a +withNewSockAddr family f = do + let sz = sizeOfSockAddrByFamily family + allocaBytes sz $ \ptr -> f ptr sz + +-- We can't write an instance of 'Storable' for 'SockAddr' because +-- @sockaddr@ is a sum type of variable size but +-- 'Foreign.Storable.sizeOf' is required to be constant. + +-- Note that on Darwin, the sockaddr structure must be zeroed before +-- use. + +-- | Write the given 'SockAddr' to the given memory location. +pokeSockAddr :: Ptr a -> SockAddr -> IO () +#if defined(DOMAIN_SOCKET_SUPPORT) +pokeSockAddr p (SockAddrUnix path) = do +#if defined(darwin_HOST_OS) + zeroMemory p (#const sizeof(struct sockaddr_un)) +#else + case path of + ('\0':_) -> zeroMemory p (#const sizeof(struct sockaddr_un)) + _ -> return () +#endif +#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) + (#poke struct sockaddr_un, sun_len) p ((#const sizeof(struct sockaddr_un)) :: Word8) +#endif + (#poke struct sockaddr_un, sun_family) p ((#const AF_UNIX) :: CSaFamily) + let pathC = map castCharToCChar path + poker = case path of ('\0':_) -> pokeArray; _ -> pokeArray0 0 + poker ((#ptr struct sockaddr_un, sun_path) p) pathC +#endif +pokeSockAddr p (SockAddrInet port addr) = do +#if defined(darwin_HOST_OS) + zeroMemory p (#const sizeof(struct sockaddr_in)) +#endif +#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) + (#poke struct sockaddr_in, sin_len) p ((#const sizeof(struct sockaddr_in)) :: Word8) +#endif + (#poke struct sockaddr_in, sin_family) p ((#const AF_INET) :: CSaFamily) + (#poke struct sockaddr_in, sin_port) p port + (#poke struct sockaddr_in, sin_addr) p addr +#if defined(IPV6_SOCKET_SUPPORT) +pokeSockAddr p (SockAddrInet6 port flow addr scope) = do +#if defined(darwin_HOST_OS) + zeroMemory p (#const sizeof(struct sockaddr_in6)) +#endif +#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) + (#poke struct sockaddr_in6, sin6_len) p ((#const sizeof(struct sockaddr_in6)) :: Word8) +#endif + (#poke struct sockaddr_in6, sin6_family) p ((#const AF_INET6) :: CSaFamily) + (#poke struct sockaddr_in6, sin6_port) p port + (#poke struct sockaddr_in6, sin6_flowinfo) p flow + (#poke struct sockaddr_in6, sin6_addr) p (In6Addr addr) + (#poke struct sockaddr_in6, sin6_scope_id) p scope +#endif +#if defined(CAN_SOCKET_SUPPORT) +pokeSockAddr p (SockAddrCan ifIndex) = do +#if defined(darwin_HOST_OS) + zeroMemory p (#const sizeof(struct sockaddr_can)) +#endif + (#poke struct sockaddr_can, can_ifindex) p ifIndex +#endif +#if !(defined(IPV6_SOCKET_SUPPORT) \ + && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) +pokeSockAddr _ _ = error "pokeSockAddr: not supported" +#endif + +-- | Read a 'SockAddr' from the given memory location. +peekSockAddr :: Ptr SockAddr -> IO SockAddr +peekSockAddr p = do + family <- (#peek struct sockaddr, sa_family) p + case family :: CSaFamily of +#if defined(DOMAIN_SOCKET_SUPPORT) + (#const AF_UNIX) -> do + str <- peekCString ((#ptr struct sockaddr_un, sun_path) p) + return (SockAddrUnix str) +#endif + (#const AF_INET) -> do + addr <- (#peek struct sockaddr_in, sin_addr) p + port <- (#peek struct sockaddr_in, sin_port) p + return (SockAddrInet port addr) +#if defined(IPV6_SOCKET_SUPPORT) + (#const AF_INET6) -> do + port <- (#peek struct sockaddr_in6, sin6_port) p + flow <- (#peek struct sockaddr_in6, sin6_flowinfo) p + In6Addr addr <- (#peek struct sockaddr_in6, sin6_addr) p + scope <- (#peek struct sockaddr_in6, sin6_scope_id) p + return (SockAddrInet6 port flow addr scope) +#endif +#if defined(CAN_SOCKET_SUPPORT) + (#const AF_CAN) -> do + ifidx <- (#peek struct sockaddr_can, can_ifindex) p + return (SockAddrCan ifidx) +#endif + _ -> ioError $ userError $ + "Network.Socket.Types.peekSockAddr: address family '" ++ + show family ++ "' not supported." + +------------------------------------------------------------------------ + +-- | The raw network byte order number is read using host byte order. +-- Therefore on little-endian architectures the byte order is swapped. For +-- example @127.0.0.1@ is represented as @0x0100007f@ on little-endian hosts +-- and as @0x7f000001@ on big-endian hosts. +-- +-- For direct manipulation prefer 'hostAddressToTuple' and +-- 'tupleToHostAddress'. +type HostAddress = Word32 + +-- | Converts 'HostAddress' to representation-independent IPv4 quadruple. +-- For example for @127.0.0.1@ the function will return @(0x7f, 0, 0, 1)@ +-- regardless of host endianness. +hostAddressToTuple :: HostAddress -> (Word8, Word8, Word8, Word8) +hostAddressToTuple ha' = + let ha = htonl ha' + byte i = fromIntegral (ha `shiftR` i) :: Word8 + in (byte 24, byte 16, byte 8, byte 0) + +-- | Converts IPv4 quadruple to 'HostAddress'. +tupleToHostAddress :: (Word8, Word8, Word8, Word8) -> HostAddress +tupleToHostAddress (b3, b2, b1, b0) = + let x `sl` i = fromIntegral x `shiftL` i :: Word32 + in ntohl $ (b3 `sl` 24) .|. (b2 `sl` 16) .|. (b1 `sl` 8) .|. (b0 `sl` 0) + +#if defined(IPV6_SOCKET_SUPPORT) +-- | Independent of endianness. For example @::1@ is stored as @(0, 0, 0, 1)@. +-- +-- For direct manipulation prefer 'hostAddress6ToTuple' and +-- 'tupleToHostAddress6'. +type HostAddress6 = (Word32, Word32, Word32, Word32) + +hostAddress6ToTuple :: HostAddress6 -> (Word16, Word16, Word16, Word16, + Word16, Word16, Word16, Word16) +hostAddress6ToTuple (w3, w2, w1, w0) = + let high, low :: Word32 -> Word16 + high w = fromIntegral (w `shiftR` 16) + low w = fromIntegral w + in (high w3, low w3, high w2, low w2, high w1, low w1, high w0, low w0) + +tupleToHostAddress6 :: (Word16, Word16, Word16, Word16, + Word16, Word16, Word16, Word16) -> HostAddress6 +tupleToHostAddress6 (w7, w6, w5, w4, w3, w2, w1, w0) = + let add :: Word16 -> Word16 -> Word32 + high `add` low = (fromIntegral high `shiftL` 16) .|. (fromIntegral low) + in (w7 `add` w6, w5 `add` w4, w3 `add` w2, w1 `add` w0) + +-- The peek32 and poke32 functions work around the fact that the RFCs +-- don't require 32-bit-wide address fields to be present. We can +-- only portably rely on an 8-bit field, s6_addr. + +s6_addr_offset :: Int +s6_addr_offset = (#offset struct in6_addr, s6_addr) + +peek32 :: Ptr a -> Int -> IO Word32 +peek32 p i0 = do + let i' = i0 * 4 + peekByte n = peekByteOff p (s6_addr_offset + i' + n) :: IO Word8 + a `sl` i = fromIntegral a `shiftL` i + a0 <- peekByte 0 + a1 <- peekByte 1 + a2 <- peekByte 2 + a3 <- peekByte 3 + return ((a0 `sl` 24) .|. (a1 `sl` 16) .|. (a2 `sl` 8) .|. (a3 `sl` 0)) + +poke32 :: Ptr a -> Int -> Word32 -> IO () +poke32 p i0 a = do + let i' = i0 * 4 + pokeByte n = pokeByteOff p (s6_addr_offset + i' + n) + x `sr` i = fromIntegral (x `shiftR` i) :: Word8 + pokeByte 0 (a `sr` 24) + pokeByte 1 (a `sr` 16) + pokeByte 2 (a `sr` 8) + pokeByte 3 (a `sr` 0) + +-- | Private newtype proxy for the Storable instance. To avoid orphan instances. +newtype In6Addr = In6Addr HostAddress6 + +#if __GLASGOW_HASKELL__ < 800 +#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__) +#endif + +instance Storable In6Addr where + sizeOf _ = #const sizeof(struct in6_addr) + alignment _ = #alignment struct in6_addr + + peek p = do + a <- peek32 p 0 + b <- peek32 p 1 + c <- peek32 p 2 + d <- peek32 p 3 + return $ In6Addr (a, b, c, d) + + poke p (In6Addr (a, b, c, d)) = do + poke32 p 0 a + poke32 p 1 b + poke32 p 2 c + poke32 p 3 d +#endif + +------------------------------------------------------------------------ +-- Helper functions + +foreign import ccall unsafe "string.h" memset :: Ptr a -> CInt -> CSize -> IO () + +-- | Zero a structure. +zeroMemory :: Ptr a -> CSize -> IO () +zeroMemory dest nbytes = memset dest 0 (fromIntegral nbytes) diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket.hsc cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket.hsc --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network/Socket.hsc 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network/Socket.hsc 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,1965 @@ +{-# LANGUAGE CPP, ScopedTypeVariables, RecordWildCards #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} +----------------------------------------------------------------------------- +-- | +-- Module : Network.Socket +-- Copyright : (c) The University of Glasgow 2001 +-- License : BSD-style (see the file libraries/network/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- This is the main module of the network package supposed to be +-- used with either "Network.Socket.ByteString" or +-- "Network.Socket.ByteString.Lazy" for sending/receiving. +-- +-- Here are two minimal example programs using the TCP/IP protocol: a +-- server that echoes all data that it receives back (servicing only +-- one client) and a client using it. +-- +-- > -- Echo server program +-- > module Main (main) where +-- > +-- > import Control.Concurrent (forkFinally) +-- > import qualified Control.Exception as E +-- > import Control.Monad (unless, forever, void) +-- > import qualified Data.ByteString as S +-- > import Network.Socket hiding (recv) +-- > import Network.Socket.ByteString (recv, sendAll) +-- > +-- > main :: IO () +-- > main = withSocketsDo $ do +-- > addr <- resolve "3000" +-- > E.bracket (open addr) close loop +-- > where +-- > resolve port = do +-- > let hints = defaultHints { +-- > addrFlags = [AI_PASSIVE] +-- > , addrSocketType = Stream +-- > } +-- > addr:_ <- getAddrInfo (Just hints) Nothing (Just port) +-- > return addr +-- > open addr = do +-- > sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) +-- > setSocketOption sock ReuseAddr 1 +-- > bind sock (addrAddress addr) +-- > -- If the prefork technique is not used, +-- > -- set CloseOnExec for the security reasons. +-- > let fd = fdSocket sock +-- > setCloseOnExecIfNeeded fd +-- > listen sock 10 +-- > return sock +-- > loop sock = forever $ do +-- > (conn, peer) <- accept sock +-- > putStrLn $ "Connection from " ++ show peer +-- > void $ forkFinally (talk conn) (\_ -> close conn) +-- > talk conn = do +-- > msg <- recv conn 1024 +-- > unless (S.null msg) $ do +-- > sendAll conn msg +-- > talk conn +-- +-- > {-# LANGUAGE OverloadedStrings #-} +-- > -- Echo client program +-- > module Main (main) where +-- > +-- > import qualified Control.Exception as E +-- > import qualified Data.ByteString.Char8 as C +-- > import Network.Socket hiding (recv) +-- > import Network.Socket.ByteString (recv, sendAll) +-- > +-- > main :: IO () +-- > main = withSocketsDo $ do +-- > addr <- resolve "127.0.0.1" "3000" +-- > E.bracket (open addr) close talk +-- > where +-- > resolve host port = do +-- > let hints = defaultHints { addrSocketType = Stream } +-- > addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) +-- > return addr +-- > open addr = do +-- > sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) +-- > connect sock $ addrAddress addr +-- > return sock +-- > talk sock = do +-- > sendAll sock "Hello, world!" +-- > msg <- recv sock 1024 +-- > putStr "Received: " +-- > C.putStrLn msg +-- +-- The proper programming model is that one 'Socket' is handled by +-- a single thread. If multiple threads use one 'Socket' concurrently, +-- unexpected things would happen. There is one exception for multiple +-- threads vs a single 'Socket': one thread reads data from a 'Socket' +-- only and the other thread writes data to the 'Socket' only. +----------------------------------------------------------------------------- + +#include "HsNet.h" +##include "HsNetDef.h" + +module Network.Socket + ( + -- * Initialisation + withSocketsDo + -- * Address information + , getAddrInfo + -- ** Types + , HostName + , ServiceName + , AddrInfo(..) + , defaultHints + -- ** Flags + , AddrInfoFlag(..) + , addrInfoFlagImplemented + -- * Socket operations + , connect + , bind + , listen + , accept + -- ** Closing + , close + , close' + , shutdown + , ShutdownCmd(..) + -- * Socket options + , SocketOption(..) + , isSupportedSocketOption + , getSocketOption + , setSocketOption + -- * Socket + , Socket(..) + , socket + , fdSocket + , mkSocket + , socketToHandle + -- ** Types of Socket + , SocketType(..) + , isSupportedSocketType + -- ** Family + , Family(..) + , isSupportedFamily + -- ** Protocol number + , ProtocolNumber + , defaultProtocol + -- * Socket address + , SockAddr(..) + , isSupportedSockAddr + , getPeerName + , getSocketName + -- ** Host address + , HostAddress + , hostAddressToTuple + , tupleToHostAddress +#if defined(IPV6_SOCKET_SUPPORT) + -- ** Host address6 + , HostAddress6 + , hostAddress6ToTuple + , tupleToHostAddress6 + -- ** Flow Info + , FlowInfo + -- ** Scope ID + , ScopeID +# if defined(HAVE_IF_NAMETOINDEX) + , ifNameToIndex + , ifIndexToName +# endif +#endif + -- ** Port number + , PortNumber + , defaultPort + , socketPortSafe + , socketPort + -- * UNIX-domain socket + , isUnixDomainSocketAvailable + , socketPair + , sendFd + , recvFd + , getPeerCredential +#if defined(IPV6_SOCKET_SUPPORT) + -- * Name information + , NameInfoFlag(..) + , getNameInfo +#endif + -- * Low level operations + , setCloseOnExecIfNeeded + , getCloseOnExec + , setNonBlockIfNeeded + , getNonBlock + -- * Sending and receiving data + , sendBuf + , recvBuf + , sendBufTo + , recvBufFrom + -- * Special constants + , maxListenQueue + -- * Deprecated + -- ** Deprecated sending and receiving + , send + , sendTo + , recv + , recvFrom + , recvLen + -- ** Deprecated address functions + , htonl + , ntohl + , inet_addr + , inet_ntoa + -- ** Deprecated socket operations + , bindSocket + , sClose + -- ** Deprecated socket status + , SocketStatus(..) -- fixme + , isConnected + , isBound + , isListening + , isReadable + , isWritable + , sIsConnected + , sIsBound + , sIsListening + , sIsReadable + , sIsWritable + -- ** Deprecated special constants + , aNY_PORT + , iNADDR_ANY +#if defined(IPV6_SOCKET_SUPPORT) + , iN6ADDR_ANY +#endif + , sOMAXCONN + , sOL_SOCKET +#ifdef SCM_RIGHTS + , sCM_RIGHTS +#endif + -- ** Decrecated internal functions + , packFamily + , unpackFamily + , packSocketType + -- ** Decrecated UNIX-domain functions +#if defined(HAVE_STRUCT_UCRED) || defined(HAVE_GETPEEREID) + -- get the credentials of our domain socket peer. + , getPeerCred +#if defined(HAVE_GETPEEREID) + , getPeerEid +#endif +#endif + ) where + +import Data.Bits +import Data.Functor +import Data.List (foldl') +import Data.Maybe (isJust) +import Data.Word (Word8, Word32) +import Foreign.Ptr (Ptr, castPtr, nullPtr) +import Foreign.Storable (Storable(..)) +import Foreign.C.Error +import Foreign.C.String (CString, withCString, withCStringLen, peekCString, peekCStringLen) +import Foreign.C.Types (CUInt(..), CChar) +import Foreign.C.Types (CInt(..), CSize(..)) +import Foreign.Marshal.Alloc ( alloca, allocaBytes ) +import Foreign.Marshal.Array ( peekArray ) +import Foreign.Marshal.Utils ( maybeWith, with ) + +import System.IO +import Control.Monad (liftM, when, void) + +import qualified Control.Exception as E +import Control.Concurrent.MVar +import Data.Typeable +import System.IO.Error + +import GHC.Conc (threadWaitWrite) +# ifdef HAVE_ACCEPT4 +import GHC.Conc (threadWaitRead) +# endif +##if MIN_VERSION_base(4,3,1) +import GHC.Conc (closeFdWith) +##endif +# if defined(mingw32_HOST_OS) +import GHC.Conc (asyncDoProc) +import GHC.IO.FD (FD(..), readRawBufferPtr, writeRawBufferPtr) +import Foreign (FunPtr) +# endif +# if defined(darwin_HOST_OS) +import Data.List (delete) +# endif +import qualified GHC.IO.Device +import GHC.IO.Handle.FD +import GHC.IO.Exception +import GHC.IO +import qualified System.Posix.Internals + +import Network.Socket.Internal +import Network.Socket.Types + +import Prelude -- Silence AMP warnings + +-- | Either a host name e.g., @\"haskell.org\"@ or a numeric host +-- address string consisting of a dotted decimal IPv4 address or an +-- IPv6 address e.g., @\"192.168.0.1\"@. +type HostName = String +type ServiceName = String + +-- ---------------------------------------------------------------------------- +-- On Windows, our sockets are not put in non-blocking mode (non-blocking +-- is not supported for regular file descriptors on Windows, and it would +-- be a pain to support it only for sockets). So there are two cases: +-- +-- - the threaded RTS uses safe calls for socket operations to get +-- non-blocking I/O, just like the rest of the I/O library +-- +-- - with the non-threaded RTS, only some operations on sockets will be +-- non-blocking. Reads and writes go through the normal async I/O +-- system. accept() uses asyncDoProc so is non-blocking. A handful +-- of others (recvFrom, sendFd, recvFd) will block all threads - if this +-- is a problem, -threaded is the workaround. +-- +##if defined(mingw32_HOST_OS) +##define SAFE_ON_WIN safe +##else +##define SAFE_ON_WIN unsafe +##endif + +----------------------------------------------------------------------------- +-- Socket types + +#if defined(mingw32_HOST_OS) +socket2FD (MkSocket fd _ _ _ _) = + -- HACK, 1 means True + FD{fdFD = fd,fdIsSocket_ = 1} +#endif + +-- | Smart constructor for constructing a 'Socket'. It should only be +-- called once for every new file descriptor. The caller must make +-- sure that the socket is in non-blocking mode. See +-- 'setNonBlockIfNeeded'. +mkSocket :: CInt + -> Family + -> SocketType + -> ProtocolNumber + -> SocketStatus + -> IO Socket +mkSocket fd fam sType pNum stat = do + mStat <- newMVar stat + withSocketsDo $ return () + return $ MkSocket fd fam sType pNum mStat + +-- | This is the default protocol for a given service. +defaultProtocol :: ProtocolNumber +defaultProtocol = 0 + +----------------------------------------------------------------------------- +-- SockAddr + +instance Show SockAddr where +#if defined(DOMAIN_SOCKET_SUPPORT) + showsPrec _ (SockAddrUnix str) = showString str +#endif + showsPrec _ (SockAddrInet port ha) + = showString (unsafePerformIO (inet_ntoa ha)) + . showString ":" + . shows port +#if defined(IPV6_SOCKET_SUPPORT) + showsPrec _ addr@(SockAddrInet6 port _ _ _) + = showChar '[' + . showString (unsafePerformIO $ + fst `liftM` getNameInfo [NI_NUMERICHOST] True False addr >>= + maybe (fail "showsPrec: impossible internal error") return) + . showString "]:" + . shows port +#endif +#if defined(CAN_SOCKET_SUPPORT) + showsPrec _ (SockAddrCan ifidx) = shows ifidx +#endif +#if !(defined(IPV6_SOCKET_SUPPORT) \ + && defined(DOMAIN_SOCKET_SUPPORT) && defined(CAN_SOCKET_SUPPORT)) + showsPrec _ _ = error "showsPrec: not supported" +#endif + +----------------------------------------------------------------------------- +-- Connection Functions + +-- In the following connection and binding primitives. The names of +-- the equivalent C functions have been preserved where possible. It +-- should be noted that some of these names used in the C library, +-- \tr{bind} in particular, have a different meaning to many Haskell +-- programmers and have thus been renamed by appending the prefix +-- Socket. + +-- | Create a new socket using the given address family, socket type +-- and protocol number. The address family is usually 'AF_INET', +-- 'AF_INET6', or 'AF_UNIX'. The socket type is usually 'Stream' or +-- 'Datagram'. The protocol number is usually 'defaultProtocol'. +-- If 'AF_INET6' is used and the socket type is 'Stream' or 'Datagram', +-- the 'IPv6Only' socket option is set to 0 so that both IPv4 and IPv6 +-- can be handled with one socket. +-- +-- >>> let hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_NUMERICSERV], addrSocketType = Stream } +-- >>> addr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "5000") +-- >>> sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) +-- >>> bind sock (addrAddress addr) +-- >>> getSocketName sock +-- 127.0.0.1:5000 +socket :: Family -- Family Name (usually AF_INET) + -> SocketType -- Socket Type (usually Stream) + -> ProtocolNumber -- Protocol Number (getProtocolByName to find value) + -> IO Socket -- Unconnected Socket +socket family stype protocol = do + c_stype <- packSocketTypeOrThrow "socket" stype + fd <- throwSocketErrorIfMinus1Retry "Network.Socket.socket" $ + c_socket (packFamily family) c_stype protocol + setNonBlockIfNeeded fd + sock <- mkSocket fd family stype protocol NotConnected +#if HAVE_DECL_IPV6_V6ONLY + -- The default value of the IPv6Only option is platform specific, + -- so we explicitly set it to 0 to provide a common default. +# if defined(mingw32_HOST_OS) + -- The IPv6Only option is only supported on Windows Vista and later, + -- so trying to change it might throw an error. + when (family == AF_INET6 && (stype == Stream || stype == Datagram)) $ + E.catch (setSocketOption sock IPv6Only 0) $ (\(_ :: E.IOException) -> return ()) +# elif !defined(__OpenBSD__) + when (family == AF_INET6 && (stype == Stream || stype == Datagram)) $ + setSocketOption sock IPv6Only 0 `onException` close sock +# endif +#endif + return sock + +-- | Build a pair of connected socket objects using the given address +-- family, socket type, and protocol number. Address family, socket +-- type, and protocol number are as for the 'socket' function above. +-- Availability: Unix. +socketPair :: Family -- Family Name (usually AF_INET or AF_INET6) + -> SocketType -- Socket Type (usually Stream) + -> ProtocolNumber -- Protocol Number + -> IO (Socket, Socket) -- unnamed and connected. +#if defined(DOMAIN_SOCKET_SUPPORT) +socketPair family stype protocol = do + allocaBytes (2 * sizeOf (1 :: CInt)) $ \ fdArr -> do + c_stype <- packSocketTypeOrThrow "socketPair" stype + _rc <- throwSocketErrorIfMinus1Retry "Network.Socket.socketpair" $ + c_socketpair (packFamily family) c_stype protocol fdArr + [fd1,fd2] <- peekArray 2 fdArr + s1 <- mkNonBlockingSocket fd1 + s2 <- mkNonBlockingSocket fd2 + return (s1,s2) + where + mkNonBlockingSocket fd = do + setNonBlockIfNeeded fd + mkSocket fd family stype protocol Connected + +foreign import ccall unsafe "socketpair" + c_socketpair :: CInt -> CInt -> CInt -> Ptr CInt -> IO CInt +#else +socketPair _ _ _ = error "Network.Socket.socketPair" +#endif + +----------------------------------------------------------------------------- + +#if defined(mingw32_HOST_OS) +#else +fGetFd :: CInt +fGetFd = #const F_GETFD +fGetFl :: CInt +fGetFl = #const F_GETFL +fdCloexec :: CInt +fdCloexec = #const FD_CLOEXEC +oNonBlock :: CInt +oNonBlock = #const O_NONBLOCK +# if defined(HAVE_ACCEPT4) +sockNonBlock :: CInt +sockNonBlock = #const SOCK_NONBLOCK +sockCloexec :: CInt +sockCloexec = #const SOCK_CLOEXEC +# endif +#endif + +-- | Set the nonblocking flag on Unix. +-- On Windows, nothing is done. +setNonBlockIfNeeded :: CInt -> IO () +setNonBlockIfNeeded fd = + System.Posix.Internals.setNonBlockingFD fd True + +-- | Set the close_on_exec flag on Unix. +-- On Windows, nothing is done. +-- +-- Since 2.7.0.0. +setCloseOnExecIfNeeded :: CInt -> IO () +#if defined(mingw32_HOST_OS) +setCloseOnExecIfNeeded _ = return () +#else +setCloseOnExecIfNeeded fd = System.Posix.Internals.setCloseOnExec fd +#endif + +#if !defined(mingw32_HOST_OS) +foreign import ccall unsafe "fcntl" + c_fcntl_read :: CInt -> CInt -> CInt -> IO CInt +#endif + +-- | Get the nonblocking flag. +-- On Windows, this function always returns 'False'. +-- +-- Since 2.7.0.0. +getCloseOnExec :: CInt -> IO Bool +#if defined(mingw32_HOST_OS) +getCloseOnExec _ = return False +#else +getCloseOnExec fd = do + flags <- c_fcntl_read fd fGetFd 0 + let ret = flags .&. fdCloexec + return (ret /= 0) +#endif + +-- | Get the close_on_exec flag. +-- On Windows, this function always returns 'False'. +-- +-- Since 2.7.0.0. +getNonBlock :: CInt -> IO Bool +#if defined(mingw32_HOST_OS) +getNonBlock _ = return False +#else +getNonBlock fd = do + flags <- c_fcntl_read fd fGetFl 0 + let ret = flags .&. oNonBlock + return (ret /= 0) +#endif + +----------------------------------------------------------------------------- +-- Binding a socket + +-- | Bind the socket to an address. The socket must not already be +-- bound. The 'Family' passed to @bind@ must be the +-- same as that passed to 'socket'. If the special port number +-- 'defaultPort' is passed then the system assigns the next available +-- use port. +bind :: Socket -- Unconnected Socket + -> SockAddr -- Address to Bind to + -> IO () +bind (MkSocket s _family _stype _protocol socketStatus) addr = do + modifyMVar_ socketStatus $ \ status -> do + if status /= NotConnected + then + ioError $ userError $ + "Network.Socket.bind: can't bind to socket with status " ++ show status + else do + withSockAddr addr $ \p_addr sz -> do + _status <- throwSocketErrorIfMinus1Retry "Network.Socket.bind" $ + c_bind s p_addr (fromIntegral sz) + return Bound + +----------------------------------------------------------------------------- +-- Connecting a socket + +-- | Connect to a remote socket at address. +connect :: Socket -- Unconnected Socket + -> SockAddr -- Socket address stuff + -> IO () +connect sock@(MkSocket s _family _stype _protocol socketStatus) addr = withSocketsDo $ do + modifyMVar_ socketStatus $ \currentStatus -> do + if currentStatus /= NotConnected && currentStatus /= Bound + then + ioError $ userError $ + errLoc ++ ": can't connect to socket with status " ++ show currentStatus + else do + withSockAddr addr $ \p_addr sz -> do + + let connectLoop = do + r <- c_connect s p_addr (fromIntegral sz) + if r == -1 + then do +#if !(defined(HAVE_WINSOCK2_H)) + err <- getErrno + case () of + _ | err == eINTR -> connectLoop + _ | err == eINPROGRESS -> connectBlocked +-- _ | err == eAGAIN -> connectBlocked + _otherwise -> throwSocketError errLoc +#else + throwSocketError errLoc +#endif + else return () + + connectBlocked = do + threadWaitWrite (fromIntegral s) + err <- getSocketOption sock SoError + if (err == 0) + then return () + else throwSocketErrorCode errLoc (fromIntegral err) + + connectLoop + return Connected + where + errLoc = "Network.Socket.connect: " ++ show sock + +----------------------------------------------------------------------------- +-- Listen + +-- | Listen for connections made to the socket. The second argument +-- specifies the maximum number of queued connections and should be at +-- least 1; the maximum value is system-dependent (usually 5). +listen :: Socket -- Connected & Bound Socket + -> Int -- Queue Length + -> IO () +listen (MkSocket s _family _stype _protocol socketStatus) backlog = do + modifyMVar_ socketStatus $ \ status -> do + if status /= Bound + then + ioError $ userError $ + "Network.Socket.listen: can't listen on socket with status " ++ show status + else do + throwSocketErrorIfMinus1Retry_ "Network.Socket.listen" $ + c_listen s (fromIntegral backlog) + return Listening + +----------------------------------------------------------------------------- +-- Accept +-- +-- A call to `accept' only returns when data is available on the given +-- socket, unless the socket has been set to non-blocking. It will +-- return a new socket which should be used to read the incoming data and +-- should then be closed. Using the socket returned by `accept' allows +-- incoming requests to be queued on the original socket. + +-- | Accept a connection. The socket must be bound to an address and +-- listening for connections. The return value is a pair @(conn, +-- address)@ where @conn@ is a new socket object usable to send and +-- receive data on the connection, and @address@ is the address bound +-- to the socket on the other end of the connection. +accept :: Socket -- Queue Socket + -> IO (Socket, -- Readable Socket + SockAddr) -- Peer details + +accept sock@(MkSocket s family stype protocol status) = do + currentStatus <- readMVar status + if not $ isAcceptable family stype currentStatus + then + ioError $ userError $ + "Network.Socket.accept: can't accept socket (" ++ + show (family, stype, protocol) ++ ") with status " ++ + show currentStatus + else do + let sz = sizeOfSockAddrByFamily family + allocaBytes sz $ \ sockaddr -> do +#if defined(mingw32_HOST_OS) + new_sock <- + if threaded + then with (fromIntegral sz) $ \ ptr_len -> + throwSocketErrorIfMinus1Retry "Network.Socket.accept" $ + c_accept_safe s sockaddr ptr_len + else do + paramData <- c_newAcceptParams s (fromIntegral sz) sockaddr + rc <- asyncDoProc c_acceptDoProc paramData + new_sock <- c_acceptNewSock paramData + c_free paramData + when (rc /= 0) $ + throwSocketErrorCode "Network.Socket.accept" (fromIntegral rc) + return new_sock +#else + with (fromIntegral sz) $ \ ptr_len -> do +# ifdef HAVE_ACCEPT4 + new_sock <- throwSocketErrorIfMinus1RetryMayBlock "Network.Socket.accept" + (threadWaitRead (fromIntegral s)) + (c_accept4 s sockaddr ptr_len (sockNonBlock .|. sockCloexec)) +# else + new_sock <- throwSocketErrorWaitRead sock "Network.Socket.accept" + (c_accept s sockaddr ptr_len) + setNonBlockIfNeeded new_sock + setCloseOnExecIfNeeded new_sock +# endif /* HAVE_ACCEPT4 */ +#endif + addr <- peekSockAddr sockaddr + sock' <- mkSocket new_sock family stype protocol Connected + return (sock', addr) + +#if defined(mingw32_HOST_OS) +foreign import ccall unsafe "HsNet.h acceptNewSock" + c_acceptNewSock :: Ptr () -> IO CInt +foreign import ccall unsafe "HsNet.h newAcceptParams" + c_newAcceptParams :: CInt -> CInt -> Ptr a -> IO (Ptr ()) +foreign import ccall unsafe "HsNet.h &acceptDoProc" + c_acceptDoProc :: FunPtr (Ptr () -> IO Int) +foreign import ccall unsafe "free" + c_free:: Ptr a -> IO () +#endif + +----------------------------------------------------------------------------- +-- ** Sending and receiving data + +-- $sendrecv +-- +-- Do not use the @send@ and @recv@ functions defined in this section +-- in new code, as they incorrectly represent binary data as a Unicode +-- string. As a result, these functions are inefficient and may lead +-- to bugs in the program. Instead use the @send@ and @recv@ +-- functions defined in the "Network.Socket.ByteString" module. + +----------------------------------------------------------------------------- +-- sendTo & recvFrom + +-- | Send data to the socket. The recipient can be specified +-- explicitly, so the socket need not be in a connected state. +-- Returns the number of bytes sent. Applications are responsible for +-- ensuring that all data has been sent. +-- +-- NOTE: blocking on Windows unless you compile with -threaded (see +-- GHC ticket #1129) +{-# DEPRECATED sendTo "Use sendTo defined in \"Network.Socket.ByteString\"" #-} +sendTo :: Socket -- (possibly) bound/connected Socket + -> String -- Data to send + -> SockAddr + -> IO Int -- Number of Bytes sent +sendTo sock xs addr = do + withCStringLen xs $ \(str, len) -> do + sendBufTo sock str len addr + +-- | Send data to the socket. The recipient can be specified +-- explicitly, so the socket need not be in a connected state. +-- Returns the number of bytes sent. Applications are responsible for +-- ensuring that all data has been sent. +sendBufTo :: Socket -- (possibly) bound/connected Socket + -> Ptr a -> Int -- Data to send + -> SockAddr + -> IO Int -- Number of Bytes sent +sendBufTo sock@(MkSocket s _family _stype _protocol _status) ptr nbytes addr = do + withSockAddr addr $ \p_addr sz -> do + liftM fromIntegral $ + throwSocketErrorWaitWrite sock "Network.Socket.sendBufTo" $ + c_sendto s ptr (fromIntegral $ nbytes) 0{-flags-} + p_addr (fromIntegral sz) + +-- | Receive data from the socket. The socket need not be in a +-- connected state. Returns @(bytes, nbytes, address)@ where @bytes@ +-- is a @String@ of length @nbytes@ representing the data received and +-- @address@ is a 'SockAddr' representing the address of the sending +-- socket. +-- +-- NOTE: blocking on Windows unless you compile with -threaded (see +-- GHC ticket #1129) +{-# DEPRECATED recvFrom "Use recvFrom defined in \"Network.Socket.ByteString\"" #-} +recvFrom :: Socket -> Int -> IO (String, Int, SockAddr) +recvFrom sock nbytes = + allocaBytes nbytes $ \ptr -> do + (len, sockaddr) <- recvBufFrom sock ptr nbytes + str <- peekCStringLen (ptr, len) + return (str, len, sockaddr) + +-- | Receive data from the socket, writing it into buffer instead of +-- creating a new string. The socket need not be in a connected +-- state. Returns @(nbytes, address)@ where @nbytes@ is the number of +-- bytes received and @address@ is a 'SockAddr' representing the +-- address of the sending socket. +-- +-- NOTE: blocking on Windows unless you compile with -threaded (see +-- GHC ticket #1129) +recvBufFrom :: Socket -> Ptr a -> Int -> IO (Int, SockAddr) +recvBufFrom sock@(MkSocket s family _stype _protocol _status) ptr nbytes + | nbytes <= 0 = ioError (mkInvalidRecvArgError "Network.Socket.recvBufFrom") + | otherwise = + withNewSockAddr family $ \ptr_addr sz -> do + alloca $ \ptr_len -> do + poke ptr_len (fromIntegral sz) + len <- throwSocketErrorWaitRead sock "Network.Socket.recvBufFrom" $ + c_recvfrom s ptr (fromIntegral nbytes) 0{-flags-} + ptr_addr ptr_len + let len' = fromIntegral len + if len' == 0 + then ioError (mkEOFError "Network.Socket.recvFrom") + else do + flg <- isConnected sock + -- For at least one implementation (WinSock 2), recvfrom() ignores + -- filling in the sockaddr for connected TCP sockets. Cope with + -- this by using getPeerName instead. + sockaddr <- + if flg then + getPeerName sock + else + peekSockAddr ptr_addr + return (len', sockaddr) + +----------------------------------------------------------------------------- +-- send & recv + +-- | Send data to the socket. The socket must be connected to a remote +-- socket. Returns the number of bytes sent. Applications are +-- responsible for ensuring that all data has been sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +{-# DEPRECATED send "Use send defined in \"Network.Socket.ByteString\"" #-} +send :: Socket -- Bound/Connected Socket + -> String -- Data to send + -> IO Int -- Number of Bytes sent +send sock xs = withCStringLen xs $ \(str, len) -> + sendBuf sock (castPtr str) len + +-- | Send data to the socket. The socket must be connected to a remote +-- socket. Returns the number of bytes sent. Applications are +-- responsible for ensuring that all data has been sent. +-- +-- Sending data to closed socket may lead to undefined behaviour. +sendBuf :: Socket -- Bound/Connected Socket + -> Ptr Word8 -- Pointer to the data to send + -> Int -- Length of the buffer + -> IO Int -- Number of Bytes sent +sendBuf sock@(MkSocket s _family _stype _protocol _status) str len = do + liftM fromIntegral $ +#if defined(mingw32_HOST_OS) +-- writeRawBufferPtr is supposed to handle checking for errors, but it's broken +-- on x86_64 because of GHC bug #12010 so we duplicate the check here. The call +-- to throwSocketErrorIfMinus1Retry can be removed when no GHC version with the +-- bug is supported. + throwSocketErrorIfMinus1Retry "Network.Socket.sendBuf" $ writeRawBufferPtr + "Network.Socket.sendBuf" + (socket2FD sock) + (castPtr str) + 0 + (fromIntegral len) +#else + throwSocketErrorWaitWrite sock "Network.Socket.sendBuf" $ + c_send s str (fromIntegral len) 0{-flags-} +#endif + + +-- | Receive data from the socket. The socket must be in a connected +-- state. This function may return fewer bytes than specified. If the +-- message is longer than the specified length, it may be discarded +-- depending on the type of socket. This function may block until a +-- message arrives. +-- +-- Considering hardware and network realities, the maximum number of +-- bytes to receive should be a small power of 2, e.g., 4096. +-- +-- For TCP sockets, a zero length return value means the peer has +-- closed its half side of the connection. +-- +-- Receiving data from closed socket may lead to undefined behaviour. +{-# DEPRECATED recv "Use recv defined in \"Network.Socket.ByteString\"" #-} +recv :: Socket -> Int -> IO String +recv sock l = fst <$> recvLen sock l + +{-# DEPRECATED recvLen "Use recv defined in \"Network.Socket.ByteString\" with \"Data.Bytestring.length\"" #-} +recvLen :: Socket -> Int -> IO (String, Int) +recvLen sock nbytes = + allocaBytes nbytes $ \ptr -> do + len <- recvBuf sock ptr nbytes + s <- peekCStringLen (castPtr ptr,len) + return (s, len) + +-- | Receive data from the socket. The socket must be in a connected +-- state. This function may return fewer bytes than specified. If the +-- message is longer than the specified length, it may be discarded +-- depending on the type of socket. This function may block until a +-- message arrives. +-- +-- Considering hardware and network realities, the maximum number of +-- bytes to receive should be a small power of 2, e.g., 4096. +-- +-- For TCP sockets, a zero length return value means the peer has +-- closed its half side of the connection. +-- +-- Receiving data from closed socket may lead to undefined behaviour. +recvBuf :: Socket -> Ptr Word8 -> Int -> IO Int +recvBuf sock@(MkSocket s _family _stype _protocol _status) ptr nbytes + | nbytes <= 0 = ioError (mkInvalidRecvArgError "Network.Socket.recvBuf") + | otherwise = do + len <- +#if defined(mingw32_HOST_OS) +-- see comment in sendBuf above. + throwSocketErrorIfMinus1Retry "Network.Socket.recvBuf" $ + readRawBufferPtr "Network.Socket.recvBuf" + (socket2FD sock) ptr 0 (fromIntegral nbytes) +#else + throwSocketErrorWaitRead sock "Network.Socket.recvBuf" $ + c_recv s (castPtr ptr) (fromIntegral nbytes) 0{-flags-} +#endif + let len' = fromIntegral len + if len' == 0 + then ioError (mkEOFError "Network.Socket.recvBuf") + else return len' + + +-- --------------------------------------------------------------------------- +-- socketPort +-- +-- The port number the given socket is currently connected to can be +-- determined by calling $port$, is generally only useful when bind +-- was given $aNY\_PORT$. + +-- | Getting the port of socket. +-- `IOError` is thrown if a port is not available. +socketPort :: Socket -- Connected & Bound Socket + -> IO PortNumber -- Port Number of Socket +socketPort sock@(MkSocket _ AF_INET _ _ _) = do + (SockAddrInet port _) <- getSocketName sock + return port +#if defined(IPV6_SOCKET_SUPPORT) +socketPort sock@(MkSocket _ AF_INET6 _ _ _) = do + (SockAddrInet6 port _ _ _) <- getSocketName sock + return port +#endif +socketPort (MkSocket _ family _ _ _) = + ioError $ userError $ + "Network.Socket.socketPort: address family '" ++ show family ++ + "' not supported." + + +-- --------------------------------------------------------------------------- +-- socketPortSafe +-- | Getting the port of socket. +socketPortSafe :: Socket -- Connected & Bound Socket + -> IO (Maybe PortNumber) -- Port Number of Socket +socketPortSafe s = do + sa <- getSocketName s + return $ case sa of + SockAddrInet port _ -> Just port +#if defined(IPV6_SOCKET_SUPPORT) + SockAddrInet6 port _ _ _ -> Just port +#endif + _ -> Nothing + +-- --------------------------------------------------------------------------- +-- getPeerName + +-- Calling $getPeerName$ returns the address details of the machine, +-- other than the local one, which is connected to the socket. This is +-- used in programs such as FTP to determine where to send the +-- returning data. The corresponding call to get the details of the +-- local machine is $getSocketName$. + +getPeerName :: Socket -> IO SockAddr +getPeerName (MkSocket s family _ _ _) = do + withNewSockAddr family $ \ptr sz -> do + with (fromIntegral sz) $ \int_star -> do + throwSocketErrorIfMinus1Retry_ "Network.Socket.getPeerName" $ + c_getpeername s ptr int_star + _sz <- peek int_star + peekSockAddr ptr + +getSocketName :: Socket -> IO SockAddr +getSocketName (MkSocket s family _ _ _) = do + withNewSockAddr family $ \ptr sz -> do + with (fromIntegral sz) $ \int_star -> do + throwSocketErrorIfMinus1Retry_ "Network.Socket.getSocketName" $ + c_getsockname s ptr int_star + peekSockAddr ptr + +----------------------------------------------------------------------------- +-- Socket Properties + +-- | Socket options for use with 'setSocketOption' and 'getSocketOption'. +-- +-- The existence of a constructor does not imply that the relevant option +-- is supported on your system: see 'isSupportedSocketOption' +data SocketOption + = Debug -- ^ SO_DEBUG + | ReuseAddr -- ^ SO_REUSEADDR + | Type -- ^ SO_TYPE + | SoError -- ^ SO_ERROR + | DontRoute -- ^ SO_DONTROUTE + | Broadcast -- ^ SO_BROADCAST + | SendBuffer -- ^ SO_SNDBUF + | RecvBuffer -- ^ SO_RCVBUF + | KeepAlive -- ^ SO_KEEPALIVE + | OOBInline -- ^ SO_OOBINLINE + | TimeToLive -- ^ IP_TTL + | MaxSegment -- ^ TCP_MAXSEG + | NoDelay -- ^ TCP_NODELAY + | Cork -- ^ TCP_CORK + | Linger -- ^ SO_LINGER + | ReusePort -- ^ SO_REUSEPORT + | RecvLowWater -- ^ SO_RCVLOWAT + | SendLowWater -- ^ SO_SNDLOWAT + | RecvTimeOut -- ^ SO_RCVTIMEO + | SendTimeOut -- ^ SO_SNDTIMEO + | UseLoopBack -- ^ SO_USELOOPBACK + | UserTimeout -- ^ TCP_USER_TIMEOUT + | IPv6Only -- ^ IPV6_V6ONLY + | CustomSockOpt (CInt, CInt) + deriving (Show, Typeable) + +-- | Does the 'SocketOption' exist on this system? +isSupportedSocketOption :: SocketOption -> Bool +isSupportedSocketOption = isJust . packSocketOption + +-- | For a socket option, return Just (level, value) where level is the +-- corresponding C option level constant (e.g. SOL_SOCKET) and value is +-- the option constant itself (e.g. SO_DEBUG) +-- If either constant does not exist, return Nothing. +packSocketOption :: SocketOption -> Maybe (CInt, CInt) +packSocketOption so = + -- The Just here is a hack to disable GHC's overlapping pattern detection: + -- the problem is if all constants are present, the fallback pattern is + -- redundant, but if they aren't then it isn't. Hence we introduce an + -- extra pattern (Nothing) that can't possibly happen, so that the + -- fallback is always (in principle) necessary. + -- I feel a little bad for including this, but such are the sacrifices we + -- make while working with CPP - excluding the fallback pattern correctly + -- would be a serious nuisance. + -- (NB: comments elsewhere in this file refer to this one) + case Just so of +#ifdef SOL_SOCKET +#ifdef SO_DEBUG + Just Debug -> Just ((#const SOL_SOCKET), (#const SO_DEBUG)) +#endif +#ifdef SO_REUSEADDR + Just ReuseAddr -> Just ((#const SOL_SOCKET), (#const SO_REUSEADDR)) +#endif +#ifdef SO_TYPE + Just Type -> Just ((#const SOL_SOCKET), (#const SO_TYPE)) +#endif +#ifdef SO_ERROR + Just SoError -> Just ((#const SOL_SOCKET), (#const SO_ERROR)) +#endif +#ifdef SO_DONTROUTE + Just DontRoute -> Just ((#const SOL_SOCKET), (#const SO_DONTROUTE)) +#endif +#ifdef SO_BROADCAST + Just Broadcast -> Just ((#const SOL_SOCKET), (#const SO_BROADCAST)) +#endif +#ifdef SO_SNDBUF + Just SendBuffer -> Just ((#const SOL_SOCKET), (#const SO_SNDBUF)) +#endif +#ifdef SO_RCVBUF + Just RecvBuffer -> Just ((#const SOL_SOCKET), (#const SO_RCVBUF)) +#endif +#ifdef SO_KEEPALIVE + Just KeepAlive -> Just ((#const SOL_SOCKET), (#const SO_KEEPALIVE)) +#endif +#ifdef SO_OOBINLINE + Just OOBInline -> Just ((#const SOL_SOCKET), (#const SO_OOBINLINE)) +#endif +#ifdef SO_LINGER + Just Linger -> Just ((#const SOL_SOCKET), (#const SO_LINGER)) +#endif +#ifdef SO_REUSEPORT + Just ReusePort -> Just ((#const SOL_SOCKET), (#const SO_REUSEPORT)) +#endif +#ifdef SO_RCVLOWAT + Just RecvLowWater -> Just ((#const SOL_SOCKET), (#const SO_RCVLOWAT)) +#endif +#ifdef SO_SNDLOWAT + Just SendLowWater -> Just ((#const SOL_SOCKET), (#const SO_SNDLOWAT)) +#endif +#ifdef SO_RCVTIMEO + Just RecvTimeOut -> Just ((#const SOL_SOCKET), (#const SO_RCVTIMEO)) +#endif +#ifdef SO_SNDTIMEO + Just SendTimeOut -> Just ((#const SOL_SOCKET), (#const SO_SNDTIMEO)) +#endif +#ifdef SO_USELOOPBACK + Just UseLoopBack -> Just ((#const SOL_SOCKET), (#const SO_USELOOPBACK)) +#endif +#endif // SOL_SOCKET +#if HAVE_DECL_IPPROTO_IP +#ifdef IP_TTL + Just TimeToLive -> Just ((#const IPPROTO_IP), (#const IP_TTL)) +#endif +#endif // HAVE_DECL_IPPROTO_IP +#if HAVE_DECL_IPPROTO_TCP +#ifdef TCP_MAXSEG + Just MaxSegment -> Just ((#const IPPROTO_TCP), (#const TCP_MAXSEG)) +#endif +#ifdef TCP_NODELAY + Just NoDelay -> Just ((#const IPPROTO_TCP), (#const TCP_NODELAY)) +#endif +#ifdef TCP_USER_TIMEOUT + Just UserTimeout -> Just ((#const IPPROTO_TCP), (#const TCP_USER_TIMEOUT)) +#endif +#ifdef TCP_CORK + Just Cork -> Just ((#const IPPROTO_TCP), (#const TCP_CORK)) +#endif +#endif // HAVE_DECL_IPPROTO_TCP +#if HAVE_DECL_IPPROTO_IPV6 +#if HAVE_DECL_IPV6_V6ONLY + Just IPv6Only -> Just ((#const IPPROTO_IPV6), (#const IPV6_V6ONLY)) +#endif +#endif // HAVE_DECL_IPPROTO_IPV6 + Just (CustomSockOpt opt) -> Just opt + _ -> Nothing + +-- | Return the option level and option value if they exist, +-- otherwise throw an error that begins "Network.Socket." ++ the String +-- parameter +packSocketOption' :: String -> SocketOption -> IO (CInt, CInt) +packSocketOption' caller so = maybe err return (packSocketOption so) + where + err = ioError . userError . concat $ ["Network.Socket.", caller, + ": socket option ", show so, " unsupported on this system"] + +-- | Set a socket option that expects an Int value. +-- There is currently no API to set e.g. the timeval socket options +setSocketOption :: Socket + -> SocketOption -- Option Name + -> Int -- Option Value + -> IO () +setSocketOption (MkSocket s _ _ _ _) so v = do + (level, opt) <- packSocketOption' "setSocketOption" so + with (fromIntegral v) $ \ptr_v -> do + throwSocketErrorIfMinus1_ "Network.Socket.setSocketOption" $ + c_setsockopt s level opt ptr_v + (fromIntegral (sizeOf (undefined :: CInt))) + return () + + +-- | Get a socket option that gives an Int value. +-- There is currently no API to get e.g. the timeval socket options +getSocketOption :: Socket + -> SocketOption -- Option Name + -> IO Int -- Option Value +getSocketOption (MkSocket s _ _ _ _) so = do + (level, opt) <- packSocketOption' "getSocketOption" so + alloca $ \ptr_v -> + with (fromIntegral (sizeOf (undefined :: CInt))) $ \ptr_sz -> do + throwSocketErrorIfMinus1Retry_ "Network.Socket.getSocketOption" $ + c_getsockopt s level opt ptr_v ptr_sz + fromIntegral `liftM` peek ptr_v + + +-- | Getting process ID, user ID and group ID for UNIX-domain sockets. +-- +-- This is implemented with SO_PEERCRED on Linux and getpeereid() +-- on BSD variants. Unfortunately, on some BSD variants +-- getpeereid() returns unexpected results, rather than an error, +-- for AF_INET sockets. It is the user's responsibility to make sure +-- that the socket is a UNIX-domain socket. +-- Also, on some BSD variants, getpeereid() does not return credentials +-- for sockets created via 'socketPair', only separately created and then +-- explicitly connected UNIX-domain sockets work on such systems. +-- +-- Since 2.7.0.0. +getPeerCredential :: Socket -> IO (Maybe CUInt, Maybe CUInt, Maybe CUInt) +#ifdef HAVE_STRUCT_UCRED +getPeerCredential sock = do + (pid, uid, gid) <- getPeerCred sock + if uid == maxBound then + return (Nothing, Nothing, Nothing) + else + return (Just pid, Just uid, Just gid) +#elif defined(HAVE_GETPEEREID) +getPeerCredential sock = E.handle (\(E.SomeException _) -> return (Nothing,Nothing,Nothing)) $ do + (uid, gid) <- getPeerEid sock + return (Nothing, Just uid, Just gid) +#else +getPeerCredential _ = return (Nothing, Nothing, Nothing) +#endif + +#if defined(HAVE_STRUCT_UCRED) || defined(HAVE_GETPEEREID) +{-# DEPRECATED getPeerCred "Use getPeerCredential instead" #-} +-- | Returns the processID, userID and groupID of the socket's peer. +-- +-- Only available on platforms that support SO_PEERCRED or GETPEEREID(3) +-- on domain sockets. +-- GETPEEREID(3) returns userID and groupID. processID is always 0. +getPeerCred :: Socket -> IO (CUInt, CUInt, CUInt) +getPeerCred sock = do +#ifdef HAVE_STRUCT_UCRED + let fd = fdSocket sock + let sz = (#const sizeof(struct ucred)) + allocaBytes sz $ \ ptr_cr -> + with (fromIntegral sz) $ \ ptr_sz -> do + _ <- ($) throwSocketErrorIfMinus1Retry "Network.Socket.getPeerCred" $ + c_getsockopt fd (#const SOL_SOCKET) (#const SO_PEERCRED) ptr_cr ptr_sz + pid <- (#peek struct ucred, pid) ptr_cr + uid <- (#peek struct ucred, uid) ptr_cr + gid <- (#peek struct ucred, gid) ptr_cr + return (pid, uid, gid) +#else + (uid,gid) <- getPeerEid sock + return (0,uid,gid) +#endif + +#ifdef HAVE_GETPEEREID +{-# DEPRECATED getPeerEid "Use getPeerCredential instead" #-} +-- | The getpeereid() function returns the effective user and group IDs of the +-- peer connected to a UNIX-domain socket +getPeerEid :: Socket -> IO (CUInt, CUInt) +getPeerEid sock = do + let fd = fdSocket sock + alloca $ \ ptr_uid -> + alloca $ \ ptr_gid -> do + throwSocketErrorIfMinus1Retry_ "Network.Socket.getPeerEid" $ + c_getpeereid fd ptr_uid ptr_gid + uid <- peek ptr_uid + gid <- peek ptr_gid + return (uid, gid) +#endif +#endif + +-- | Whether or not UNIX-domain sockets are available. +-- +-- Since 3.0.0.0. +isUnixDomainSocketAvailable :: Bool +#if defined(DOMAIN_SOCKET_SUPPORT) +isUnixDomainSocketAvailable = True +#else +isUnixDomainSocketAvailable = False +#endif + +##if !(MIN_VERSION_base(4,3,1)) +closeFdWith closer fd = closer fd +##endif + +-- sending/receiving ancillary socket data; low-level mechanism +-- for transmitting file descriptors, mainly. +sendFd :: Socket -> CInt -> IO () +#if defined(DOMAIN_SOCKET_SUPPORT) +sendFd sock outfd = do + _ <- throwSocketErrorWaitWrite sock "Network.Socket.sendFd" $ c_sendFd (fdSocket sock) outfd + return () +foreign import ccall SAFE_ON_WIN "sendFd" c_sendFd :: CInt -> CInt -> IO CInt +#else +sendFd _ _ = error "Network.Socket.sendFd" +#endif + +-- | Receive a file descriptor over a domain socket. Note that the resulting +-- file descriptor may have to be put into non-blocking mode in order to be +-- used safely. See 'setNonBlockIfNeeded'. +recvFd :: Socket -> IO CInt +#if defined(DOMAIN_SOCKET_SUPPORT) +recvFd sock = do + theFd <- throwSocketErrorWaitRead sock "Network.Socket.recvFd" $ + c_recvFd (fdSocket sock) + return theFd +foreign import ccall SAFE_ON_WIN "recvFd" c_recvFd :: CInt -> IO CInt +#else +recvFd _ = error "Network.Socket.recvFd" +#endif + +-- --------------------------------------------------------------------------- +-- Utility Functions + +{-# DEPRECATED aNY_PORT "Use defaultPort instead" #-} +aNY_PORT :: PortNumber +aNY_PORT = 0 + +defaultPort :: PortNumber +defaultPort = 0 + +-- | The IPv4 wild card address. + +{-# DEPRECATED iNADDR_ANY "Use getAddrInfo instead" #-} +iNADDR_ANY :: HostAddress +iNADDR_ANY = htonl (#const INADDR_ANY) + +-- | Converts the from host byte order to network byte order. +foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32 +-- | Converts the from network byte order to host byte order. +foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32 + +{-# DEPRECATED htonl "Use getAddrInfo instead" #-} +{-# DEPRECATED ntohl "Use getAddrInfo instead" #-} + +#if defined(IPV6_SOCKET_SUPPORT) +-- | The IPv6 wild card address. + +{-# DEPRECATED iN6ADDR_ANY "Use getAddrInfo instead" #-} +iN6ADDR_ANY :: HostAddress6 +iN6ADDR_ANY = (0, 0, 0, 0) +#endif + +{-# DEPRECATED sOMAXCONN "Use maxListenQueue instead" #-} +sOMAXCONN :: Int +sOMAXCONN = #const SOMAXCONN + +{-# DEPRECATED sOL_SOCKET "This is not necessary anymore" #-} +sOL_SOCKET :: Int +sOL_SOCKET = #const SOL_SOCKET + +#ifdef SCM_RIGHTS +{-# DEPRECATED sCM_RIGHTS "This is not necessary anymore" #-} +sCM_RIGHTS :: Int +sCM_RIGHTS = #const SCM_RIGHTS +#endif + +-- | This is the value of SOMAXCONN, typically 128. +-- 128 is good enough for normal network servers but +-- is too small for high performance servers. +maxListenQueue :: Int +maxListenQueue = sOMAXCONN + +-- ----------------------------------------------------------------------------- + +data ShutdownCmd + = ShutdownReceive + | ShutdownSend + | ShutdownBoth + deriving Typeable + +sdownCmdToInt :: ShutdownCmd -> CInt +sdownCmdToInt ShutdownReceive = 0 +sdownCmdToInt ShutdownSend = 1 +sdownCmdToInt ShutdownBoth = 2 + +-- | Shut down one or both halves of the connection, depending on the +-- second argument to the function. If the second argument is +-- 'ShutdownReceive', further receives are disallowed. If it is +-- 'ShutdownSend', further sends are disallowed. If it is +-- 'ShutdownBoth', further sends and receives are disallowed. +shutdown :: Socket -> ShutdownCmd -> IO () +shutdown (MkSocket s _ _ _ _) stype = do + throwSocketErrorIfMinus1Retry_ "Network.Socket.shutdown" $ + c_shutdown s (sdownCmdToInt stype) + return () + +-- ----------------------------------------------------------------------------- + +-- | Close the socket. This function does not throw exceptions even if +-- the underlying system call returns errors. +-- +-- Sending data to or receiving data from closed socket +-- may lead to undefined behaviour. +-- +-- If multiple threads use the same socket and one uses 'fdSocket' and +-- the other use 'close', unexpected behavior may happen. +-- For more information, please refer to the documentation of 'fdSocket'. +close :: Socket -> IO () +close (MkSocket s _ _ _ socketStatus) = modifyMVar_ socketStatus $ \ status -> + case status of + ConvertedToHandle -> return ConvertedToHandle + Closed -> return Closed + _ -> do + -- closeFdWith avoids the deadlock of IO manager. + closeFdWith (void . c_close . fromIntegral) (fromIntegral s) + return Closed + +-- | Close the socket. This function throws exceptions if +-- the underlying system call returns errors. +-- +-- Sending data to or receiving data from closed socket +-- may lead to undefined behaviour. +close' :: Socket -> IO () +close' (MkSocket s _ _ _ socketStatus) = modifyMVar_ socketStatus $ \ status -> + case status of + ConvertedToHandle -> ioError (userError ("close: converted to a Handle, use hClose instead")) + Closed -> return Closed + _ -> do + -- closeFdWith avoids the deadlock of IO manager. + -- closeFd throws exceptions. + closeFdWith (closeFd . fromIntegral) (fromIntegral s) + return Closed + +-- ----------------------------------------------------------------------------- + +-- | Determines whether 'close' has been used on the 'Socket'. This +-- does /not/ indicate any status about the socket beyond this. If the +-- socket has been closed remotely, this function can still return +-- 'True'. +isConnected :: Socket -> IO Bool +isConnected (MkSocket _ _ _ _ status) = do + value <- readMVar status + return (value == Connected) +{-# DEPRECATED isConnected "SocketStatus will be removed" #-} + +-- ----------------------------------------------------------------------------- +-- Socket Predicates + +isBound :: Socket -> IO Bool +isBound (MkSocket _ _ _ _ status) = do + value <- readMVar status + return (value == Bound) +{-# DEPRECATED isBound "SocketStatus will be removed" #-} + +isListening :: Socket -> IO Bool +isListening (MkSocket _ _ _ _ status) = do + value <- readMVar status + return (value == Listening) +{-# DEPRECATED isListening "SocketStatus will be removed" #-} + +isReadable :: Socket -> IO Bool +isReadable (MkSocket _ _ _ _ status) = do + value <- readMVar status + return (value == Listening || value == Connected) +{-# DEPRECATED isReadable "SocketStatus will be removed" #-} + +isWritable :: Socket -> IO Bool +isWritable = isReadable -- sort of. +{-# DEPRECATED isWritable "SocketStatus will be removed" #-} + +isAcceptable :: Family -> SocketType -> SocketStatus -> Bool +#if defined(DOMAIN_SOCKET_SUPPORT) +isAcceptable AF_UNIX sockTyp status + | sockTyp == Stream || sockTyp == SeqPacket = + status == Connected || status == Bound || status == Listening +isAcceptable AF_UNIX _ _ = False +#endif +isAcceptable _ _ status = status == Connected || status == Listening +{-# DEPRECATED isAcceptable "SocketStatus will be removed" #-} + +-- ----------------------------------------------------------------------------- +-- Internet address manipulation routines: + +{-# DEPRECATED inet_addr "Use \"getAddrInfo\" instead" #-} +inet_addr :: String -> IO HostAddress +inet_addr ipstr = withSocketsDo $ do + withCString ipstr $ \str -> do + had <- c_inet_addr str + if had == maxBound + then ioError $ userError $ + "Network.Socket.inet_addr: Malformed address: " ++ ipstr + else return had -- network byte order + +{-# DEPRECATED inet_ntoa "Use \"getNameInfo\" instead" #-} +inet_ntoa :: HostAddress -> IO String +inet_ntoa haddr = withSocketsDo $ do + pstr <- c_inet_ntoa haddr + peekCString pstr + +-- | Turns a Socket into an 'Handle'. By default, the new handle is +-- unbuffered. Use 'System.IO.hSetBuffering' to change the buffering. +-- +-- Note that since a 'Handle' is automatically closed by a finalizer +-- when it is no longer referenced, you should avoid doing any more +-- operations on the 'Socket' after calling 'socketToHandle'. To +-- close the 'Socket' after 'socketToHandle', call 'System.IO.hClose' +-- on the 'Handle'. + +socketToHandle :: Socket -> IOMode -> IO Handle +socketToHandle s@(MkSocket fd _ _ _ socketStatus) mode = do + modifyMVar socketStatus $ \ status -> + if status == ConvertedToHandle + then ioError (userError ("socketToHandle: already a Handle")) + else do + h <- fdToHandle' (fromIntegral fd) (Just GHC.IO.Device.Stream) True (show s) mode True{-bin-} + hSetBuffering h NoBuffering + return (ConvertedToHandle, h) + +-- | Pack a list of values into a bitmask. The possible mappings from +-- value to bit-to-set are given as the first argument. We assume +-- that each value can cause exactly one bit to be set; unpackBits will +-- break if this property is not true. + +packBits :: (Eq a, Num b, Bits b) => [(a, b)] -> [a] -> b + +packBits mapping xs = foldl' pack 0 mapping + where pack acc (k, v) | k `elem` xs = acc .|. v + | otherwise = acc + +-- | Unpack a bitmask into a list of values. + +unpackBits :: (Num b, Bits b) => [(a, b)] -> b -> [a] + +-- Be permissive and ignore unknown bit values. At least on OS X, +-- getaddrinfo returns an ai_flags field with bits set that have no +-- entry in . +unpackBits [] _ = [] +unpackBits ((k,v):xs) r + | r .&. v /= 0 = k : unpackBits xs (r .&. complement v) + | otherwise = unpackBits xs r + +----------------------------------------------------------------------------- +-- Address and service lookups + +#if defined(IPV6_SOCKET_SUPPORT) + +-- | Flags that control the querying behaviour of 'getAddrInfo'. +-- For more information, see +data AddrInfoFlag = + -- | The list of returned 'AddrInfo' values will + -- only contain IPv4 addresses if the local system has at least + -- one IPv4 interface configured, and likewise for IPv6. + -- (Only some platforms support this.) + AI_ADDRCONFIG + -- | If 'AI_ALL' is specified, return all matching IPv6 and + -- IPv4 addresses. Otherwise, this flag has no effect. + -- (Only some platforms support this.) + | AI_ALL + -- | The 'addrCanonName' field of the first returned + -- 'AddrInfo' will contain the "canonical name" of the host. + | AI_CANONNAME + -- | The 'HostName' argument /must/ be a numeric + -- address in string form, and network name lookups will not be + -- attempted. + | AI_NUMERICHOST + -- | The 'ServiceName' argument /must/ be a port + -- number in string form, and service name lookups will not be + -- attempted. (Only some platforms support this.) + | AI_NUMERICSERV + -- | If no 'HostName' value is provided, the network + -- address in each 'SockAddr' + -- will be left as a "wild card". + -- This is useful for server applications that + -- will accept connections from any client. + | AI_PASSIVE + -- | If an IPv6 lookup is performed, and no IPv6 + -- addresses are found, IPv6-mapped IPv4 addresses will be + -- returned. (Only some platforms support this.) + | AI_V4MAPPED + deriving (Eq, Read, Show, Typeable) + +aiFlagMapping :: [(AddrInfoFlag, CInt)] + +aiFlagMapping = + [ +#if HAVE_DECL_AI_ADDRCONFIG + (AI_ADDRCONFIG, #const AI_ADDRCONFIG), +#else + (AI_ADDRCONFIG, 0), +#endif +#if HAVE_DECL_AI_ALL + (AI_ALL, #const AI_ALL), +#else + (AI_ALL, 0), +#endif + (AI_CANONNAME, #const AI_CANONNAME), + (AI_NUMERICHOST, #const AI_NUMERICHOST), +#if HAVE_DECL_AI_NUMERICSERV + (AI_NUMERICSERV, #const AI_NUMERICSERV), +#else + (AI_NUMERICSERV, 0), +#endif + (AI_PASSIVE, #const AI_PASSIVE), +#if HAVE_DECL_AI_V4MAPPED + (AI_V4MAPPED, #const AI_V4MAPPED) +#else + (AI_V4MAPPED, 0) +#endif + ] + +-- | Indicate whether the given 'AddrInfoFlag' will have any effect on +-- this system. +addrInfoFlagImplemented :: AddrInfoFlag -> Bool +addrInfoFlagImplemented f = packBits aiFlagMapping [f] /= 0 + +data AddrInfo = + AddrInfo { + addrFlags :: [AddrInfoFlag], + addrFamily :: Family, + addrSocketType :: SocketType, + addrProtocol :: ProtocolNumber, + addrAddress :: SockAddr, + addrCanonName :: Maybe String + } + deriving (Eq, Show, Typeable) + +instance Storable AddrInfo where + sizeOf _ = #const sizeof(struct addrinfo) + alignment _ = alignment (undefined :: CInt) + + peek p = do + ai_flags <- (#peek struct addrinfo, ai_flags) p + ai_family <- (#peek struct addrinfo, ai_family) p + ai_socktype <- (#peek struct addrinfo, ai_socktype) p + ai_protocol <- (#peek struct addrinfo, ai_protocol) p + ai_addr <- (#peek struct addrinfo, ai_addr) p >>= peekSockAddr + ai_canonname_ptr <- (#peek struct addrinfo, ai_canonname) p + + ai_canonname <- if ai_canonname_ptr == nullPtr + then return Nothing + else liftM Just $ peekCString ai_canonname_ptr + + socktype <- unpackSocketType' "AddrInfo.peek" ai_socktype + return (AddrInfo + { + addrFlags = unpackBits aiFlagMapping ai_flags, + addrFamily = unpackFamily ai_family, + addrSocketType = socktype, + addrProtocol = ai_protocol, + addrAddress = ai_addr, + addrCanonName = ai_canonname + }) + + poke p (AddrInfo flags family socketType protocol _ _) = do + c_stype <- packSocketTypeOrThrow "AddrInfo.poke" socketType + + (#poke struct addrinfo, ai_flags) p (packBits aiFlagMapping flags) + (#poke struct addrinfo, ai_family) p (packFamily family) + (#poke struct addrinfo, ai_socktype) p c_stype + (#poke struct addrinfo, ai_protocol) p protocol + + -- stuff below is probably not needed, but let's zero it for safety + + (#poke struct addrinfo, ai_addrlen) p (0::CSize) + (#poke struct addrinfo, ai_addr) p nullPtr + (#poke struct addrinfo, ai_canonname) p nullPtr + (#poke struct addrinfo, ai_next) p nullPtr + +-- | Flags that control the querying behaviour of 'getNameInfo'. +-- For more information, see +data NameInfoFlag = + -- | Resolve a datagram-based service name. This is + -- required only for the few protocols that have different port + -- numbers for their datagram-based versions than for their + -- stream-based versions. + NI_DGRAM + -- | If the hostname cannot be looked up, an IO error is thrown. + | NI_NAMEREQD + -- | If a host is local, return only the hostname part of the FQDN. + | NI_NOFQDN + -- | The name of the host is not looked up. + -- Instead, a numeric representation of the host's + -- address is returned. For an IPv4 address, this will be a + -- dotted-quad string. For IPv6, it will be colon-separated + -- hexadecimal. + | NI_NUMERICHOST + -- | The name of the service is not + -- looked up. Instead, a numeric representation of the + -- service is returned. + | NI_NUMERICSERV + deriving (Eq, Read, Show, Typeable) + +niFlagMapping :: [(NameInfoFlag, CInt)] + +niFlagMapping = [(NI_DGRAM, #const NI_DGRAM), + (NI_NAMEREQD, #const NI_NAMEREQD), + (NI_NOFQDN, #const NI_NOFQDN), + (NI_NUMERICHOST, #const NI_NUMERICHOST), + (NI_NUMERICSERV, #const NI_NUMERICSERV)] + +-- | Default hints for address lookup with 'getAddrInfo'. The values +-- of the 'addrAddress' and 'addrCanonName' fields are 'undefined', +-- and are never inspected by 'getAddrInfo'. +-- +-- >>> addrFlags defaultHints +-- [] +-- >>> addrFamily defaultHints +-- AF_UNSPEC +-- >>> addrSocketType defaultHints +-- NoSocketType +-- >>> addrProtocol defaultHints +-- 0 + +defaultHints :: AddrInfo +defaultHints = AddrInfo { + addrFlags = [], + addrFamily = AF_UNSPEC, + addrSocketType = NoSocketType, + addrProtocol = defaultProtocol, + addrAddress = undefined, + addrCanonName = undefined + } + +-- | Shows the fields of 'defaultHints', without inspecting the by-default undefined fields 'addrAddress' and 'addrCanonName'. +showDefaultHints :: AddrInfo -> String +showDefaultHints AddrInfo{..} = concat + [ "AddrInfo {" + , "addrFlags = " + , show addrFlags + , ", addrFamily = " + , show addrFamily + , ", addrSocketType = " + , show addrSocketType + , ", addrProtocol = " + , show addrProtocol + , ", addrAddress = " + , "" + , ", addrCanonName = " + , "" + , "}" + ] + +-- | Resolve a host or service name to one or more addresses. +-- The 'AddrInfo' values that this function returns contain 'SockAddr' +-- values that you can pass directly to 'connect' or +-- 'bind'. +-- +-- This function is protocol independent. It can return both IPv4 and +-- IPv6 address information. +-- +-- The 'AddrInfo' argument specifies the preferred query behaviour, +-- socket options, or protocol. You can override these conveniently +-- using Haskell's record update syntax on 'defaultHints', for example +-- as follows: +-- +-- >>> let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Stream } +-- +-- You must provide a 'Just' value for at least one of the 'HostName' +-- or 'ServiceName' arguments. 'HostName' can be either a numeric +-- network address (dotted quad for IPv4, colon-separated hex for +-- IPv6) or a hostname. In the latter case, its addresses will be +-- looked up unless 'AI_NUMERICHOST' is specified as a hint. If you +-- do not provide a 'HostName' value /and/ do not set 'AI_PASSIVE' as +-- a hint, network addresses in the result will contain the address of +-- the loopback interface. +-- +-- If the query fails, this function throws an IO exception instead of +-- returning an empty list. Otherwise, it returns a non-empty list +-- of 'AddrInfo' values. +-- +-- There are several reasons why a query might result in several +-- values. For example, the queried-for host could be multihomed, or +-- the service might be available via several protocols. +-- +-- Note: the order of arguments is slightly different to that defined +-- for @getaddrinfo@ in RFC 2553. The 'AddrInfo' parameter comes first +-- to make partial application easier. +-- +-- >>> addr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "http") +-- >>> addrAddress addr +-- 127.0.0.1:80 + +getAddrInfo :: Maybe AddrInfo -- ^ preferred socket type or protocol + -> Maybe HostName -- ^ host name to look up + -> Maybe ServiceName -- ^ service name to look up + -> IO [AddrInfo] -- ^ resolved addresses, with "best" first + +getAddrInfo hints node service = withSocketsDo $ + maybeWith withCString node $ \c_node -> + maybeWith withCString service $ \c_service -> + maybeWith with filteredHints $ \c_hints -> + alloca $ \ptr_ptr_addrs -> do + ret <- c_getaddrinfo c_node c_service c_hints ptr_ptr_addrs + case ret of + 0 -> do ptr_addrs <- peek ptr_ptr_addrs + ais <- followAddrInfo ptr_addrs + c_freeaddrinfo ptr_addrs + return ais + _ -> do err <- gai_strerror ret + let message = concat + [ "Network.Socket.getAddrInfo (called with preferred socket type/protocol: " + , maybe (show hints) showDefaultHints hints + , ", host name: " + , show node + , ", service name: " + , show service + , ")" + ] + ioError (ioeSetErrorString + (mkIOError NoSuchThing message Nothing + Nothing) err) + -- Leaving out the service and using AI_NUMERICSERV causes a + -- segfault on OS X 10.8.2. This code removes AI_NUMERICSERV + -- (which has no effect) in that case. + where +#if defined(darwin_HOST_OS) + filteredHints = case service of + Nothing -> fmap (\ h -> h { addrFlags = delete AI_NUMERICSERV (addrFlags h) }) hints + _ -> hints +#else + filteredHints = hints +#endif + +followAddrInfo :: Ptr AddrInfo -> IO [AddrInfo] + +followAddrInfo ptr_ai | ptr_ai == nullPtr = return [] + | otherwise = do + a <- peek ptr_ai + as <- (#peek struct addrinfo, ai_next) ptr_ai >>= followAddrInfo + return (a:as) + +foreign import ccall safe "hsnet_getaddrinfo" + c_getaddrinfo :: CString -> CString -> Ptr AddrInfo -> Ptr (Ptr AddrInfo) + -> IO CInt + +foreign import ccall safe "hsnet_freeaddrinfo" + c_freeaddrinfo :: Ptr AddrInfo -> IO () + +gai_strerror :: CInt -> IO String + +#ifdef HAVE_GAI_STRERROR +gai_strerror n = c_gai_strerror n >>= peekCString + +foreign import ccall safe "gai_strerror" + c_gai_strerror :: CInt -> IO CString +#else +gai_strerror n = ioError $ userError $ "Network.Socket.gai_strerror not supported: " ++ show n +#endif + +withCStringIf :: Bool -> Int -> (CSize -> CString -> IO a) -> IO a +withCStringIf False _ f = f 0 nullPtr +withCStringIf True n f = allocaBytes n (f (fromIntegral n)) + +-- | Resolve an address to a host or service name. +-- This function is protocol independent. +-- The list of 'NameInfoFlag' values controls query behaviour. +-- +-- If a host or service's name cannot be looked up, then the numeric +-- form of the address or service will be returned. +-- +-- If the query fails, this function throws an IO exception. +-- +-- Example: +-- @ +-- (hostName, _) <- getNameInfo [] True False myAddress +-- @ + +getNameInfo :: [NameInfoFlag] -- ^ flags to control lookup behaviour + -> Bool -- ^ whether to look up a hostname + -> Bool -- ^ whether to look up a service name + -> SockAddr -- ^ the address to look up + -> IO (Maybe HostName, Maybe ServiceName) + +getNameInfo flags doHost doService addr = withSocketsDo $ + withCStringIf doHost (#const NI_MAXHOST) $ \c_hostlen c_host -> + withCStringIf doService (#const NI_MAXSERV) $ \c_servlen c_serv -> do + withSockAddr addr $ \ptr_addr sz -> do + ret <- c_getnameinfo ptr_addr (fromIntegral sz) c_host c_hostlen + c_serv c_servlen (packBits niFlagMapping flags) + case ret of + 0 -> do + let peekIf doIf c_val = if doIf + then liftM Just $ peekCString c_val + else return Nothing + host <- peekIf doHost c_host + serv <- peekIf doService c_serv + return (host, serv) + _ -> do err <- gai_strerror ret + let message = concat + [ "Network.Socket.getNameInfo (called with flags: " + , show flags + , ", hostname lookup: " + , show doHost + , ", service name lookup: " + , show doService + , ", socket address: " + , show addr + , ")" + ] + ioError (ioeSetErrorString + (mkIOError NoSuchThing message Nothing + Nothing) err) + +foreign import ccall safe "hsnet_getnameinfo" + c_getnameinfo :: Ptr SockAddr -> CInt{-CSockLen???-} -> CString -> CSize -> CString + -> CSize -> CInt -> IO CInt +#endif + +mkInvalidRecvArgError :: String -> IOError +mkInvalidRecvArgError loc = ioeSetErrorString (mkIOError + InvalidArgument + loc Nothing Nothing) "non-positive length" + +mkEOFError :: String -> IOError +mkEOFError loc = ioeSetErrorString (mkIOError EOF loc Nothing Nothing) "end of file" + +-- --------------------------------------------------------------------------- +-- foreign imports from the C library + +foreign import ccall unsafe "hsnet_inet_ntoa" + c_inet_ntoa :: HostAddress -> IO (Ptr CChar) + +foreign import CALLCONV unsafe "inet_addr" + c_inet_addr :: Ptr CChar -> IO HostAddress + +foreign import CALLCONV unsafe "shutdown" + c_shutdown :: CInt -> CInt -> IO CInt + +closeFd :: CInt -> IO () +closeFd fd = throwSocketErrorIfMinus1_ "Network.Socket.close" $ c_close fd + +#if !defined(WITH_WINSOCK) +foreign import ccall unsafe "close" + c_close :: CInt -> IO CInt +#else +foreign import stdcall unsafe "closesocket" + c_close :: CInt -> IO CInt +#endif + +foreign import CALLCONV unsafe "socket" + c_socket :: CInt -> CInt -> CInt -> IO CInt +foreign import CALLCONV unsafe "bind" + c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt +foreign import CALLCONV SAFE_ON_WIN "connect" + c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt +#ifdef HAVE_ACCEPT4 +foreign import CALLCONV unsafe "accept4" + c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt +#else +foreign import CALLCONV unsafe "accept" + c_accept :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> IO CInt +#endif +foreign import CALLCONV unsafe "listen" + c_listen :: CInt -> CInt -> IO CInt + +#if defined(mingw32_HOST_OS) +foreign import CALLCONV safe "accept" + c_accept_safe :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> IO CInt + +foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool +#endif + +foreign import CALLCONV unsafe "send" + c_send :: CInt -> Ptr a -> CSize -> CInt -> IO CInt +foreign import CALLCONV SAFE_ON_WIN "sendto" + c_sendto :: CInt -> Ptr a -> CSize -> CInt -> Ptr SockAddr -> CInt -> IO CInt +foreign import CALLCONV unsafe "recv" + c_recv :: CInt -> Ptr CChar -> CSize -> CInt -> IO CInt +foreign import CALLCONV SAFE_ON_WIN "recvfrom" + c_recvfrom :: CInt -> Ptr a -> CSize -> CInt -> Ptr SockAddr -> Ptr CInt -> IO CInt +foreign import CALLCONV unsafe "getpeername" + c_getpeername :: CInt -> Ptr SockAddr -> Ptr CInt -> IO CInt +foreign import CALLCONV unsafe "getsockname" + c_getsockname :: CInt -> Ptr SockAddr -> Ptr CInt -> IO CInt + +foreign import CALLCONV unsafe "getsockopt" + c_getsockopt :: CInt -> CInt -> CInt -> Ptr CInt -> Ptr CInt -> IO CInt +foreign import CALLCONV unsafe "setsockopt" + c_setsockopt :: CInt -> CInt -> CInt -> Ptr CInt -> CInt -> IO CInt + +#if defined(HAVE_GETPEEREID) +foreign import CALLCONV unsafe "getpeereid" + c_getpeereid :: CInt -> Ptr CUInt -> Ptr CUInt -> IO CInt +#endif +-- --------------------------------------------------------------------------- +-- * Deprecated aliases + +-- $deprecated-aliases +-- +-- These aliases are deprecated and should not be used in new code. +-- They will be removed in some future version of the package. + +{-# DEPRECATED bindSocket "use 'bind'" #-} + +-- | Deprecated alias for 'bind'. +bindSocket :: Socket -- Unconnected Socket + -> SockAddr -- Address to Bind to + -> IO () +bindSocket = bind + +{-# DEPRECATED sClose "use 'close'" #-} + +-- | Deprecated alias for 'close'. +sClose :: Socket -> IO () +sClose = close + +{-# DEPRECATED sIsConnected "SocketStatus will be removed" #-} + +sIsConnected :: Socket -> IO Bool +sIsConnected = isConnected + +{-# DEPRECATED sIsBound "SocketStatus will be removed" #-} + +sIsBound :: Socket -> IO Bool +sIsBound = isBound + +{-# DEPRECATED sIsListening "SocketStatus will be removed" #-} + +sIsListening :: Socket -> IO Bool +sIsListening = isListening + +{-# DEPRECATED sIsReadable "SocketStatus will be removed" #-} + +sIsReadable :: Socket -> IO Bool +sIsReadable = isReadable + +{-# DEPRECATED sIsWritable "SocketStatus will be removed" #-} + +sIsWritable :: Socket -> IO Bool +sIsWritable = isWritable + +#if defined(HAVE_IF_NAMETOINDEX) +-- | Returns the index corresponding to the interface name. +-- +-- Since 2.7.0.0. +ifNameToIndex :: String -> IO (Maybe Int) +ifNameToIndex ifname = do + index <- withCString ifname c_if_nametoindex + -- On failure zero is returned. We'll return Nothing. + return $ if index == 0 then Nothing else Just $ fromIntegral index + +-- | Returns the interface name corresponding to the index. +-- +-- Since 2.7.0.0. +ifIndexToName :: Int -> IO (Maybe String) +ifIndexToName ifn = allocaBytes 16 $ \ptr -> do -- 16 == IFNAMSIZ + r <- c_if_indextoname (fromIntegral ifn) ptr + if r == nullPtr then + return Nothing + else + Just <$> peekCString ptr + +foreign import CALLCONV safe "if_nametoindex" + c_if_nametoindex :: CString -> IO CUInt + +foreign import CALLCONV safe "if_indextoname" + c_if_indextoname :: CUInt -> CString -> IO CString +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/network.buildinfo.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/network.buildinfo.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/network.buildinfo.in 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/network.buildinfo.in 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,7 @@ +ghc-options: @EXTRA_CPPFLAGS@ +ghc-prof-options: @EXTRA_CPPFLAGS@ +ld-options: @LDFLAGS@ +cc-options: @EXTRA_CPPFLAGS@ +c-sources: @EXTRA_SRCS@ +extra-libraries: @EXTRA_LIBS@ +install-includes: HsNetworkConfig.h diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/network.cabal cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/network.cabal --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/network.cabal 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/network.cabal 2018-11-27 22:50:08.000000000 +0000 @@ -0,0 +1,104 @@ +name: network +version: 2.8.0.0 +license: BSD3 +license-file: LICENSE +maintainer: Kazu Yamamoto, Evan Borden +synopsis: Low-level networking interface +description: + This package provides a low-level networking interface. + . + In network-2.6 the @Network.URI@ module was split off into its own + package, network-uri-2.6. If you're using the @Network.URI@ module + you can automatically get it from the right package by adding this + to your .cabal file: + . + > library + > build-depends: network-uri-flag +category: Network +build-type: Configure +cabal-version: >=1.8 +extra-tmp-files: + config.log config.status autom4te.cache network.buildinfo + include/HsNetworkConfig.h +extra-source-files: + README.md CHANGELOG.md + examples/*.hs tests/*.hs config.guess config.sub install-sh + configure.ac configure network.buildinfo.in + include/HsNetworkConfig.h.in include/HsNet.h include/HsNetDef.h + -- C sources only used on some systems + cbits/ancilData.c cbits/asyncAccept.c cbits/initWinSock.c + cbits/winSockErr.c +homepage: https://github.com/haskell/network +bug-reports: https://github.com/haskell/network/issues +tested-with: GHC == 7.8.4 + , GHC == 7.10.3 + , GHC == 8.0.2 + , GHC == 8.2.2 + , GHC == 8.4.3 + +library + exposed-modules: + Network + Network.BSD + Network.Socket + Network.Socket.ByteString + Network.Socket.ByteString.Lazy + Network.Socket.Internal + other-modules: + Network.Socket.ByteString.Internal + Network.Socket.Types + + if !os(windows) + other-modules: + Network.Socket.ByteString.IOVec + Network.Socket.ByteString.Lazy.Posix + Network.Socket.ByteString.MsgHdr + if os(windows) + other-modules: + Network.Socket.ByteString.Lazy.Windows + + build-depends: + base >= 4.7 && < 5, + bytestring == 0.10.* + + if !os(windows) + build-depends: + unix >= 2 + + extensions: + CPP, DeriveDataTypeable, ForeignFunctionInterface, TypeSynonymInstances + include-dirs: include + includes: HsNet.h HsNetDef.h + install-includes: HsNet.h HsNetDef.h + c-sources: cbits/HsNet.c + ghc-options: -Wall -fwarn-tabs + +test-suite spec + hs-source-dirs: tests + main-is: Spec.hs + other-modules: RegressionSpec + SimpleSpec + type: exitcode-stdio-1.0 + ghc-options: -Wall -threaded + build-depends: + base >= 4.7 && < 5, + bytestring, + directory, + HUnit, + network, + hspec + +test-suite doctest + hs-source-dirs: tests + main-is: doctests.hs + type: exitcode-stdio-1.0 + + build-depends: + base >= 4.7 && < 5, + doctest >= 0.10.1 + + ghc-options: -Wall + +source-repository head + type: git + location: git://github.com/haskell/network.git diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Network.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Network.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,480 @@ +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} +{-# OPTIONS_HADDOCK hide #-} +----------------------------------------------------------------------------- +-- | +-- Module : Network +-- Copyright : (c) The University of Glasgow 2001 +-- License : BSD-style (see the file libraries/network/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- This module is kept for backwards-compatibility. New users are +-- encouraged to use "Network.Socket" instead. +-- +-- "Network" was intended as a \"higher-level\" interface to networking +-- facilities, and only supports TCP. +-- +----------------------------------------------------------------------------- + +#include "HsNetworkConfig.h" + +#ifdef HAVE_GETADDRINFO +-- Use IPv6-capable function definitions if the OS supports it. +#define IPV6_SOCKET_SUPPORT 1 +#endif + +module Network {-# DEPRECATED "The high level Network interface is no longer supported. Please use Network.Socket." #-} + ( + -- * Basic data types + Socket + , PortID(..) + , HostName + , PortNumber + + -- * Initialisation + , withSocketsDo + + -- * Server-side connections + , listenOn + , accept + , sClose + + -- * Client-side connections + , connectTo + + -- * Simple sending and receiving + {-$sendrecv-} + , sendTo + , recvFrom + + -- * Miscellaneous + , socketPort + + -- * Networking Issues + -- ** Buffering + {-$buffering-} + + -- ** Improving I\/O Performance over sockets + {-$performance-} + ) where + +import Control.Monad (liftM) +import Data.Maybe (fromJust) +import Network.BSD +import Network.Socket hiding (accept, socketPort, recvFrom, + sendTo, PortNumber, sClose) +import qualified Network.Socket as Socket (accept) +import System.IO +import Prelude +import qualified Control.Exception as Exception + +-- --------------------------------------------------------------------------- +-- High Level ``Setup'' functions + +-- If the @PortID@ specifies a unix family socket and the @Hostname@ +-- differs from that returned by @getHostname@ then an error is +-- raised. Alternatively an empty string may be given to @connectTo@ +-- signalling that the current hostname applies. + +data PortID = + Service String -- Service Name eg "ftp" + | PortNumber PortNumber -- User defined Port Number +#if !defined(mingw32_HOST_OS) + | UnixSocket String -- Unix family socket in file system +#endif + deriving (Show, Eq) + +-- | Calling 'connectTo' creates a client side socket which is +-- connected to the given host and port. The Protocol and socket type is +-- derived from the given port identifier. If a port number is given +-- then the result is always an internet family 'Stream' socket. + +connectTo :: HostName -- Hostname + -> PortID -- Port Identifier + -> IO Handle -- Connected Socket + +#if defined(IPV6_SOCKET_SUPPORT) +-- IPv6 and IPv4. + +connectTo hostname (Service serv) = connect' "Network.connectTo" hostname serv + +connectTo hostname (PortNumber port) = connect' "Network.connectTo" hostname (show port) +#else +-- IPv4 only. + +connectTo hostname (Service serv) = do + proto <- getProtocolNumber "tcp" + bracketOnError + (socket AF_INET Stream proto) + (sClose) -- only done if there's an error + (\sock -> do + port <- getServicePortNumber serv + he <- getHostByName hostname + connect sock (SockAddrInet port (hostAddress he)) + socketToHandle sock ReadWriteMode + ) + +connectTo hostname (PortNumber port) = do + proto <- getProtocolNumber "tcp" + bracketOnError + (socket AF_INET Stream proto) + (sClose) -- only done if there's an error + (\sock -> do + he <- getHostByName hostname + connect sock (SockAddrInet port (hostAddress he)) + socketToHandle sock ReadWriteMode + ) +#endif + +#if !defined(mingw32_HOST_OS) +connectTo _ (UnixSocket path) = do + bracketOnError + (socket AF_UNIX Stream 0) + (sClose) + (\sock -> do + connect sock (SockAddrUnix path) + socketToHandle sock ReadWriteMode + ) +#endif + +#if defined(IPV6_SOCKET_SUPPORT) +connect' :: String -> HostName -> ServiceName -> IO Handle + +connect' caller host serv = do + proto <- getProtocolNumber "tcp" + let hints = defaultHints { addrFlags = [AI_ADDRCONFIG] + , addrProtocol = proto + , addrSocketType = Stream } + addrs <- getAddrInfo (Just hints) (Just host) (Just serv) + firstSuccessful caller $ map tryToConnect addrs + where + tryToConnect addr = + bracketOnError + (socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)) + (sClose) -- only done if there's an error + (\sock -> do + connect sock (addrAddress addr) + socketToHandle sock ReadWriteMode + ) +#endif + +-- | Creates the server side socket which has been bound to the +-- specified port. +-- +-- 'maxListenQueue' (typically 128) is specified to the listen queue. +-- This is good enough for normal network servers but is too small +-- for high performance servers. +-- +-- To avoid the \"Address already in use\" problems, +-- the 'ReuseAddr' socket option is set on the listening socket. +-- +-- If available, the 'IPv6Only' socket option is set to 0 +-- so that both IPv4 and IPv6 can be accepted with this socket. +-- +-- If you don't like the behavior above, please use the lower level +-- 'Network.Socket.listen' instead. + +listenOn :: PortID -- ^ Port Identifier + -> IO Socket -- ^ Listening Socket + +#if defined(IPV6_SOCKET_SUPPORT) +-- IPv6 and IPv4. + +listenOn (Service serv) = listen' serv + +listenOn (PortNumber port) = listen' (show port) +#else +-- IPv4 only. + +listenOn (Service serv) = do + proto <- getProtocolNumber "tcp" + bracketOnError + (socket AF_INET Stream proto) + (sClose) + (\sock -> do + port <- getServicePortNumber serv + setSocketOption sock ReuseAddr 1 + bind sock (SockAddrInet port iNADDR_ANY) + listen sock maxListenQueue + return sock + ) + +listenOn (PortNumber port) = do + proto <- getProtocolNumber "tcp" + bracketOnError + (socket AF_INET Stream proto) + (sClose) + (\sock -> do + setSocketOption sock ReuseAddr 1 + bind sock (SockAddrInet port iNADDR_ANY) + listen sock maxListenQueue + return sock + ) +#endif + +#if !defined(mingw32_HOST_OS) +listenOn (UnixSocket path) = + bracketOnError + (socket AF_UNIX Stream 0) + (sClose) + (\sock -> do + setSocketOption sock ReuseAddr 1 + bind sock (SockAddrUnix path) + listen sock maxListenQueue + return sock + ) +#endif + +#if defined(IPV6_SOCKET_SUPPORT) +listen' :: ServiceName -> IO Socket + +listen' serv = do + proto <- getProtocolNumber "tcp" + -- We should probably specify addrFamily = AF_INET6 and the filter + -- code below should be removed. AI_ADDRCONFIG is probably not + -- necessary. But this code is well-tested. So, let's keep it. + let hints = defaultHints { addrFlags = [AI_ADDRCONFIG, AI_PASSIVE] + , addrSocketType = Stream + , addrProtocol = proto } + addrs <- getAddrInfo (Just hints) Nothing (Just serv) + -- Choose an IPv6 socket if exists. This ensures the socket can + -- handle both IPv4 and IPv6 if v6only is false. + let addrs' = filter (\x -> addrFamily x == AF_INET6) addrs + addr = if null addrs' then head addrs else head addrs' + bracketOnError + (socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)) + (sClose) + (\sock -> do + setSocketOption sock ReuseAddr 1 + bind sock (addrAddress addr) + listen sock maxListenQueue + return sock + ) +#endif + +-- ----------------------------------------------------------------------------- +-- accept + +-- | Accept a connection on a socket created by 'listenOn'. Normal +-- I\/O operations (see "System.IO") can be used on the 'Handle' +-- returned to communicate with the client. +-- Notice that although you can pass any Socket to Network.accept, +-- only sockets of either AF_UNIX, AF_INET, or AF_INET6 will work +-- (this shouldn't be a problem, though). When using AF_UNIX, HostName +-- will be set to the path of the socket and PortNumber to -1. +-- +accept :: Socket -- ^ Listening Socket + -> IO (Handle, + HostName, + PortNumber) -- ^ Triple of: read\/write 'Handle' for + -- communicating with the client, + -- the 'HostName' of the peer socket, and + -- the 'PortNumber' of the remote connection. +accept sock@(MkSocket _ AF_INET _ _ _) = do + ~(sock', (SockAddrInet port haddr)) <- Socket.accept sock + peer <- catchIO + (do + (HostEntry peer _ _ _) <- getHostByAddr AF_INET haddr + return peer + ) + (\_e -> inet_ntoa haddr) + -- if getHostByName fails, we fall back to the IP address + handle <- socketToHandle sock' ReadWriteMode + return (handle, peer, port) +#if defined(IPV6_SOCKET_SUPPORT) +accept sock@(MkSocket _ AF_INET6 _ _ _) = do + (sock', addr) <- Socket.accept sock + peer <- catchIO ((fromJust . fst) `liftM` getNameInfo [] True False addr) $ + \_ -> case addr of + SockAddrInet _ a -> inet_ntoa a + SockAddrInet6 _ _ a _ -> return (show a) +#if defined(mingw32_HOST_OS) + SockAddrUnix {} -> ioError $ userError "Network.accept: peer socket address 'SockAddrUnix' not supported on this platform." +#else + SockAddrUnix a -> return a +#endif +#if defined(CAN_SOCKET_SUPPORT) + SockAddrCan {} -> ioError $ userError "Network.accept: peer socket address 'SockAddrCan' not supported." +#else + SockAddrCan {} -> ioError $ userError "Network.accept: peer socket address 'SockAddrCan' not supported on this platform." +#endif + handle <- socketToHandle sock' ReadWriteMode + let port = case addr of + SockAddrInet p _ -> p + SockAddrInet6 p _ _ _ -> p + _ -> -1 + return (handle, peer, port) +#endif +#if !defined(mingw32_HOST_OS) +accept sock@(MkSocket _ AF_UNIX _ _ _) = do + ~(sock', (SockAddrUnix path)) <- Socket.accept sock + handle <- socketToHandle sock' ReadWriteMode + return (handle, path, -1) +#endif +accept (MkSocket _ family _ _ _) = + ioError $ userError $ "Network.accept: address family '" ++ + show family ++ "' not supported." + + +-- | Close the socket. Sending data to or receiving data from closed socket +-- may lead to undefined behaviour. +sClose :: Socket -> IO () +sClose = close -- Explicit redefinition because Network.sClose is deprecated, + -- hence the re-export would also be marked as such. + +-- ----------------------------------------------------------------------------- +-- sendTo/recvFrom + +{-$sendrecv +Send and receive data from\/to the given host and port number. These +should normally only be used where the socket will not be required for +further calls. Also, note that due to the use of 'hGetContents' in 'recvFrom' +the socket will remain open (i.e. not available) even if the function already +returned. Their use is strongly discouraged except for small test-applications +or invocations from the command line. +-} + +sendTo :: HostName -- Hostname + -> PortID -- Port Number + -> String -- Message to send + -> IO () +sendTo h p msg = do + s <- connectTo h p + hPutStr s msg + hClose s + +recvFrom :: HostName -- Hostname + -> PortID -- Port Number + -> IO String -- Received Data + +#if defined(IPV6_SOCKET_SUPPORT) +recvFrom host port = do + proto <- getProtocolNumber "tcp" + let hints = defaultHints { addrFlags = [AI_ADDRCONFIG] + , addrProtocol = proto + , addrSocketType = Stream } + allowed <- map addrAddress `liftM` getAddrInfo (Just hints) (Just host) + Nothing + s <- listenOn port + let waiting = do + (s', addr) <- Socket.accept s + if not (addr `oneOf` allowed) + then sClose s' >> waiting + else socketToHandle s' ReadMode >>= hGetContents + waiting + where + a@(SockAddrInet _ ha) `oneOf` ((SockAddrInet _ hb):bs) + | ha == hb = True + | otherwise = a `oneOf` bs + a@(SockAddrInet6 _ _ ha _) `oneOf` ((SockAddrInet6 _ _ hb _):bs) + | ha == hb = True + | otherwise = a `oneOf` bs + _ `oneOf` _ = False +#else +recvFrom host port = do + ip <- getHostByName host + let ipHs = hostAddresses ip + s <- listenOn port + let + waiting = do + ~(s', SockAddrInet _ haddr) <- Socket.accept s + he <- getHostByAddr AF_INET haddr + if not (any (`elem` ipHs) (hostAddresses he)) + then do + sClose s' + waiting + else do + h <- socketToHandle s' ReadMode + msg <- hGetContents h + return msg + + message <- waiting + return message +#endif + +-- --------------------------------------------------------------------------- +-- Access function returning the port type/id of socket. + +-- | Returns the 'PortID' associated with a given socket. +socketPort :: Socket -> IO PortID +socketPort s = do + sockaddr <- getSocketName s + case sockaddr of + SockAddrInet port _ -> return $ PortNumber port +#if defined(IPV6_SOCKET_SUPPORT) + SockAddrInet6 port _ _ _ -> return $ PortNumber port +#else + SockAddrInet6 {} -> ioError $ userError "Network.socketPort: socket address 'SockAddrInet6' not supported on this platform." +#endif +#if defined(mingw32_HOST_OS) + SockAddrUnix {} -> ioError $ userError "Network.socketPort: socket address 'SockAddrUnix' not supported on this platform." +#else + SockAddrUnix path -> return $ UnixSocket path +#endif + SockAddrCan {} -> ioError $ userError "Network.socketPort: socket address 'SockAddrCan' not supported." + +-- --------------------------------------------------------------------------- +-- Utils + +-- Like bracket, but only performs the final action if there was an +-- exception raised by the middle bit. +bracketOnError + :: IO a -- ^ computation to run first (\"acquire resource\") + -> (a -> IO b) -- ^ computation to run last (\"release resource\") + -> (a -> IO c) -- ^ computation to run in-between + -> IO c -- returns the value from the in-between computation +bracketOnError = Exception.bracketOnError + +----------------------------------------------------------------------------- +-- Extra documentation + +{-$buffering + +The 'Handle' returned by 'connectTo' and 'accept' is 'NoBuffering' by +default. For an interactive application you may want to set the +buffering mode on the 'Handle' to +'LineBuffering' or 'BlockBuffering', like so: + +> h <- connectTo host port +> hSetBuffering h LineBuffering +-} + +{-$performance + +For really fast I\/O, it might be worth looking at the 'hGetBuf' and +'hPutBuf' family of functions in "System.IO". +-} + +catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a +#if MIN_VERSION_base(4,0,0) +catchIO = Exception.catch +#else +catchIO = Exception.catchJust Exception.ioErrors +#endif + +-- Version of try implemented in terms of the locally defined catchIO +tryIO :: IO a -> IO (Either Exception.IOException a) +tryIO m = catchIO (liftM Right m) (return . Left) + +-- Returns the first action from a list which does not throw an exception. +-- If all the actions throw exceptions (and the list of actions is not empty), +-- the last exception is thrown. +-- The operations are run outside of the catchIO cleanup handler because +-- catchIO masks asynchronous exceptions in the cleanup handler. +-- In the case of complete failure, the last exception is actually thrown. +firstSuccessful :: String -> [IO a] -> IO a +firstSuccessful caller = go Nothing + where + -- Attempt the next operation, remember exception on failure + go _ (p:ps) = + do r <- tryIO p + case r of + Right x -> return x + Left e -> go (Just e) ps + + -- All operations failed, throw error if one exists + go Nothing [] = ioError $ userError $ caller ++ ": firstSuccessful: empty list" + go (Just e) [] = Exception.throwIO e diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/README.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/README.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/README.md 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/README.md 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,19 @@ +# [`network`](http://hackage.haskell.org/package/network) [![Build Status](https://travis-ci.org/haskell/network.svg?branch=master)](https://travis-ci.org/haskell/network) [![Build status](https://ci.appveyor.com/api/projects/status/5erq63o4m29bhl57/branch/master?svg=true)](https://ci.appveyor.com/project/eborden/network/branch/master) + +To build this package using Cabal directly from git, you must run +`autoreconf` before the usual Cabal build steps +(configure/build/install). `autoreconf` is included in the +[GNU Autoconf](http://www.gnu.org/software/autoconf/) tools. There is +no need to run the `configure` script: the `setup configure` step will +do this for you. + +## Support Policy + +### GHC + +`network`'s GHC policy supports 3 [stable](https://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/intro.html#ghc-version-numbering-policy) versions. The current stable +version and two previous stable versions are supported. + +### Hugs, JHC, UHC + +`network` does not officially support these compilers. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Setup.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Setup.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/Setup.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/Setup.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,6 @@ +module Main (main) where + +import Distribution.Simple + +main :: IO () +main = defaultMainWithHooks autoconfUserHooks diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/BadFileDescriptor.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/BadFileDescriptor.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/BadFileDescriptor.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/BadFileDescriptor.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,51 @@ +-- Test code for "threadWait: invalid argument (Bad file descriptor)" +-- See https://ghc.haskell.org/trac/ghc/ticket/14621 +-- See https://github.com/haskell/network/issues/287 +-- +-- % runghc BadFileDescriptor.hs +-- BadFileDescriptor.hs: threadWait: invalid argument (Bad file descriptor) +module Main where + +import Control.Concurrent (forkIO) +import Control.Monad (void, forever) +import Network.Socket hiding (recv) +import Network.Socket.ByteString (recv, sendAll) + +main :: IO () +main = do + let localhost = "localhost" + listenPort = "9876" + connectPort = "6789" + proxy localhost listenPort connectPort + +proxy :: HostName -> ServiceName -> ServiceName -> IO () +proxy localhost listenPort connectPort = do + fromClient <- serverSocket localhost listenPort + toServer <- clientSocket localhost connectPort + void $ forkIO $ relay toServer fromClient + relay fromClient toServer + +relay :: Socket -> Socket -> IO () +relay s1 s2 = forever $ do + payload <- recv s1 4096 + sendAll s2 payload + +serverSocket :: HostName -> ServiceName -> IO Socket +serverSocket host port = do + let hints = defaultHints { + addrFlags = [AI_PASSIVE] + , addrSocketType = Stream + } + addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) + bind sock (addrAddress addr) + listen sock 1 + fst <$> accept sock + +clientSocket :: HostName -> ServiceName -> IO Socket +clientSocket host port = do + let hints = defaultHints { addrSocketType = Stream } + addr:_ <- getAddrInfo (Just hints) (Just host) (Just port) + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) + connect sock (addrAddress addr) + return sock diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/doctests.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/doctests.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/doctests.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/doctests.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,20 @@ +import Test.DocTest + +main :: IO () +main = doctest [ + "-i" + , "-idist/build" + , "-i." + , "-idist/build/autogen" + , "-Idist/build/autogen" + , "-Idist/build" + , "-Iinclude" + , "-optP-include" + , "-optPdist/build/autogen/cabal_macros.h" + , "-DCALLCONV=ccall" + , "-XCPP" + , "-XDeriveDataTypeable" + , "-package-db dist/package.conf.inplace" + , "-package network" + , "Network" + ] diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/RegressionSpec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/RegressionSpec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/RegressionSpec.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/RegressionSpec.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,29 @@ +{-# LANGUAGE OverloadedStrings #-} +-- | Tests for things that didn't work in the past. +module RegressionSpec (main, spec) where + +import Control.Monad +import Network.Socket hiding (send, sendTo, recv, recvFrom) +import Network.Socket.ByteString + +import Test.Hspec + +main :: IO () +main = hspec spec + +spec :: Spec +spec = do + describe "getAddrInfo" $ do + it "does not cause segfault on macOS 10.8.2 due to AI_NUMERICSERV" $ do + let hints = defaultHints { addrFlags = [AI_NUMERICSERV] } + void $ getAddrInfo (Just hints) (Just "localhost") Nothing + + describe "Network.Socket.ByteString.recv" $ do + it "checks -1 correctly on Windows" $ do + sock <- socket AF_INET Stream defaultProtocol + recv sock 1024 `shouldThrow` anyException + + describe "Network.Socket.ByteString.send" $ do + it "checks -1 correctly on Windows" $ do + sock <- socket AF_INET Stream defaultProtocol + send sock "hello world" `shouldThrow` anyException diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/SimpleSpec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/SimpleSpec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/SimpleSpec.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/SimpleSpec.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1,344 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module SimpleSpec (main, spec) where + +import Control.Concurrent (ThreadId, forkIO, myThreadId) +import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar, readMVar) +import qualified Control.Exception as E +import Control.Monad +import Data.ByteString (ByteString) +import qualified Data.ByteString as S +import qualified Data.ByteString.Char8 as C +import qualified Data.ByteString.Lazy as L +import Network.Socket hiding (send, sendTo, recv, recvFrom) +import Network.Socket.ByteString +import qualified Network.Socket.ByteString.Lazy as Lazy +import System.Directory +import System.Timeout (timeout) + +import Test.Hspec + +main :: IO () +main = hspec spec + +spec :: Spec +spec = do + describe "send" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` testMsg + client sock = send sock testMsg + tcpTest client server + + describe "sendAll" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` testMsg + client sock = sendAll sock testMsg + tcpTest client server + + describe "Lazy.sendAll" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` testMsg + client sock = Lazy.sendAll sock $ L.fromChunks [testMsg] + tcpTest client server + + describe "sendTo" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` testMsg + client sock serverPort = do + let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Datagram } + addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) + sendTo sock testMsg $ addrAddress addr + udpTest client server + + describe "sendAllTo" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` testMsg + client sock serverPort = do + let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Datagram } + addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) + sendAllTo sock testMsg $ addrAddress addr + udpTest client server + + describe "sendMany" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` (S.append seg1 seg2) + client sock = sendMany sock [seg1, seg2] + + seg1 = C.pack "This is a " + seg2 = C.pack "test message." + tcpTest client server + + describe "sendManyTo" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` (S.append seg1 seg2) + client sock serverPort = do + let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Datagram } + addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) + sendManyTo sock [seg1, seg2] $ addrAddress addr + + seg1 = C.pack "This is a " + seg2 = C.pack "test message." + udpTest client server + + describe "recv" $ do + it "works well" $ do + let server sock = recv sock 1024 `shouldReturn` testMsg + client sock = send sock testMsg + tcpTest client server + + it "can treat overflow" $ do + let server sock = do seg1 <- recv sock (S.length testMsg - 3) + seg2 <- recv sock 1024 + let msg = S.append seg1 seg2 + msg `shouldBe` testMsg + client sock = send sock testMsg + tcpTest client server + + it "returns empty string at EOF" $ do + let client s = recv s 4096 `shouldReturn` S.empty + server s = shutdown s ShutdownSend + tcpTest client server + + describe "recvFrom" $ do + it "works well" $ do + let server sock = do (msg, _) <- recvFrom sock 1024 + testMsg `shouldBe` msg + client sock = do + addr <- getPeerName sock + sendTo sock testMsg addr + tcpTest client server + it "can treat overflow" $ do + let server sock = do (seg1, _) <- recvFrom sock (S.length testMsg - 3) + (seg2, _) <- recvFrom sock 1024 + let msg = S.append seg1 seg2 + testMsg `shouldBe` msg + + client sock = send sock testMsg + tcpTest client server + + describe "UserTimeout" $ do + it "can be set" $ do + when (isSupportedSocketOption UserTimeout) $ do + sock <- socket AF_INET Stream defaultProtocol + setSocketOption sock UserTimeout 1000 + getSocketOption sock UserTimeout `shouldReturn` 1000 + setSocketOption sock UserTimeout 2000 + getSocketOption sock UserTimeout `shouldReturn` 2000 + close sock + + -- On various BSD systems the peer credentials are exchanged during + -- connect(), and this does not happen with `socketpair()`. Therefore, + -- we must actually set up a listener and connect, rather than use a + -- socketpair(). + -- + describe "getPeerCredential" $ do + it "can return something" $ do + when isUnixDomainSocketAvailable $ do + -- It would be useful to check that we did not get garbage + -- back, but rather the actual uid of the test program. For + -- that we'd need System.Posix.User, but that is not available + -- under Windows. For now, accept the risk that we did not get + -- the right answer. + -- + let client sock = do + (_, uid, _) <- getPeerCredential sock + uid `shouldNotBe` Nothing + server (sock, _) = do + (_, uid, _) <- getPeerCredential sock + uid `shouldNotBe` Nothing + unixTest client server + {- The below test fails on many *BSD systems, because the getsockopt() + call that underlies getpeereid() does not have the same meaning for + all address families, but the C-library was not checking that the + provided sock is an AF_UNIX socket. This will fixed some day, but + we should not fail on those systems in the mean-time. The upstream + C-library fix is to call getsockname() and check the address family + before calling `getpeereid()`. We could duplicate that in our own + code, and then this test would work on those platforms that have + `getpeereid()` and not the SO_PEERCRED socket option. + + it "return nothing for non-UNIX-domain socket" $ do + when isUnixDomainSocketAvailable $ do + s <- socket AF_INET Stream defaultProtocol + cred1 <- getPeerCredential s + cred1 `shouldBe` (Nothing,Nothing,Nothing) + -} + + describe "getAddrInfo" $ do + it "works for IPv4 address" $ do + let hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_ADDRCONFIG] } + AddrInfo{addrAddress = (SockAddrInet _ hostAddr)}:_ <- + getAddrInfo (Just hints) (Just "127.128.129.130") Nothing + hostAddressToTuple hostAddr `shouldBe` (0x7f, 0x80, 0x81, 0x82) +#if defined(IPV6_SOCKET_SUPPORT) + it "works for IPv6 address" $ do + let hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_ADDRCONFIG] } + host = "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + AddrInfo{addrAddress = (SockAddrInet6 _ _ hostAddr _)}:_ <- + getAddrInfo (Just hints) (Just host) Nothing + hostAddress6ToTuple hostAddr + `shouldBe` (0x2001, 0x0db8, 0x85a3, 0x0000, 0x0000, 0x8a2e, 0x0370, 0x7334) +#endif + +------------------------------------------------------------------------ + +serverAddr :: String +serverAddr = "127.0.0.1" + +testMsg :: ByteString +testMsg = "This is a test message." + +unixAddr :: String +unixAddr = "/tmp/network-test" + +------------------------------------------------------------------------ +-- Test helpers + +-- | Establish a connection between client and server and then run +-- 'clientAct' and 'serverAct', in different threads. Both actions +-- get passed a connected 'Socket', used for communicating between +-- client and server. 'unixTest' makes sure that the 'Socket' is +-- closed after the actions have run. +unixTest :: (Socket -> IO a) -> ((Socket, SockAddr) -> IO b) -> IO () +unixTest clientAct serverAct = do + test clientSetup clientAct serverSetup server + where + clientSetup = do + sock <- socket AF_UNIX Stream defaultProtocol + connect sock (SockAddrUnix unixAddr) + return sock + + serverSetup = do + sock <- socket AF_UNIX Stream defaultProtocol + unlink unixAddr -- just in case + bind sock (SockAddrUnix unixAddr) + listen sock 1 + return sock + + server sock = E.bracket (accept sock) (killClientSock . fst) serverAct + + unlink file = do + exist <- doesFileExist file + when exist $ removeFile file + + killClientSock sock = do + shutdown sock ShutdownBoth + close sock + unlink unixAddr + +-- | Establish a connection between client and server and then run +-- 'clientAct' and 'serverAct', in different threads. Both actions +-- get passed a connected 'Socket', used for communicating between +-- client and server. 'tcpTest' makes sure that the 'Socket' is +-- closed after the actions have run. +tcpTest :: (Socket -> IO a) -> (Socket -> IO b) -> IO () +tcpTest clientAct serverAct = do + portVar <- newEmptyMVar + test (clientSetup portVar) clientAct (serverSetup portVar) server + where + clientSetup portVar = do + let hints = defaultHints { addrSocketType = Stream } + serverPort <- readMVar portVar + addr:_ <- getAddrInfo (Just hints) (Just serverAddr) (Just $ show serverPort) + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) +#if !defined(mingw32_HOST_OS) + let fd = fdSocket sock + getNonBlock fd `shouldReturn` True + getCloseOnExec fd `shouldReturn` False +#endif + connect sock $ addrAddress addr + return sock + + serverSetup portVar = do + let hints = defaultHints { + addrFlags = [AI_PASSIVE] + , addrSocketType = Stream + } + addr:_ <- getAddrInfo (Just hints) (Just serverAddr) Nothing + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) + let fd = fdSocket sock +#if !defined(mingw32_HOST_OS) + getNonBlock fd `shouldReturn` True + getCloseOnExec fd `shouldReturn` False +#endif + setSocketOption sock ReuseAddr 1 + setCloseOnExecIfNeeded fd +#if !defined(mingw32_HOST_OS) + getCloseOnExec fd `shouldReturn` True +#endif + bind sock $ addrAddress addr + listen sock 1 + serverPort <- socketPort sock + putMVar portVar serverPort + return sock + + server sock = do + (clientSock, _) <- accept sock +#if !defined(mingw32_HOST_OS) + let fd = fdSocket clientSock + getNonBlock fd `shouldReturn` True + getCloseOnExec fd `shouldReturn` True +#endif + _ <- serverAct clientSock + close clientSock + +-- | Create an unconnected 'Socket' for sending UDP and receiving +-- datagrams and then run 'clientAct' and 'serverAct'. +udpTest :: (Socket -> PortNumber -> IO a) -> (Socket -> IO b) -> IO () +udpTest clientAct serverAct = do + portVar <- newEmptyMVar + test clientSetup (client portVar) (serverSetup portVar) serverAct + where + clientSetup = socket AF_INET Datagram defaultProtocol + + client portVar sock = do + serverPort <- readMVar portVar + clientAct sock serverPort + + serverSetup portVar = do + let hints = defaultHints { + addrFlags = [AI_PASSIVE] + , addrSocketType = Datagram + } + addr:_ <- getAddrInfo (Just hints) (Just serverAddr) Nothing + sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) + setSocketOption sock ReuseAddr 1 + bind sock $ addrAddress addr + serverPort <- socketPort sock + putMVar portVar serverPort + return sock + +-- | Run a client/server pair and synchronize them so that the server +-- is started before the client and the specified server action is +-- finished before the client closes the 'Socket'. +test :: IO Socket -> (Socket -> IO b) -> IO Socket -> (Socket -> IO c) -> IO () +test clientSetup clientAct serverSetup serverAct = do + tid <- myThreadId + barrier <- newEmptyMVar + _ <- forkIO $ server barrier + client tid barrier + where + server barrier = do + E.bracket serverSetup close $ \sock -> do + serverReady + Just _ <- timeout 1000000 $ serverAct sock + putMVar barrier () + where + -- | Signal to the client that it can proceed. + serverReady = putMVar barrier () + + client tid barrier = do + takeMVar barrier + -- Transfer exceptions to the main thread. + bracketWithReraise tid clientSetup close $ \res -> do + Just _ <- timeout 1000000 $ clientAct res + takeMVar barrier + +-- | Like 'bracket' but catches and reraises the exception in another +-- thread, specified by the first argument. +bracketWithReraise :: ThreadId -> IO a -> (a -> IO b) -> (a -> IO ()) -> IO () +bracketWithReraise tid setup teardown thing = + E.bracket setup teardown thing + `E.catch` \ (e :: E.SomeException) -> E.throwTo tid e diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/Spec.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/Spec.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/network-2.8.0.0/tests/Spec.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/network-2.8.0.0/tests/Spec.hs 2018-09-04 22:14:52.000000000 +0000 @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/cbits/hs_resolv_config.h.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/cbits/hs_resolv_config.h.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/cbits/hs_resolv_config.h.in 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/cbits/hs_resolv_config.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* cbits/hs_resolv_config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_NAMESER_H - -/* Define to 1 if you have the declaration of `res_nquery', and to 0 if you - don't. */ -#undef HAVE_DECL_RES_NQUERY - -/* Define to 1 if you have the declaration of `res_query', and to 0 if you - don't. */ -#undef HAVE_DECL_RES_QUERY - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of `struct __res_state', as computed by sizeof. */ -#undef SIZEOF_STRUCT___RES_STATE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 in order to use res_nquery(3) API */ -#undef USE_RES_NQUERY - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/cbits/hs_resolv.h cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/cbits/hs_resolv.h --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/cbits/hs_resolv.h 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/cbits/hs_resolv.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -#if !defined(HS_RESOLV_H) -#define HS_RESOLV_H - -#include "hs_resolv_config.h" - -#include - -#if defined(HAVE_NETINET_IN_H) -# include -#endif - -#if defined(HAVE_ARPA_NAMESER_H) -# include -#endif - -#include - -#include - -/* This is usually provided via */ -#if !defined(QUERY) -# define QUERY ns_o_query -#endif - -#if !defined(USE_RES_NQUERY) -# error USE_RES_NQUERY not defined -#endif - -#if USE_RES_NQUERY && (SIZEOF_STRUCT___RES_STATE <= 0) -# error broken invariant -#endif - -#if USE_RES_NQUERY - -inline static int -res_opt_set_use_dnssec(struct __res_state *s) -{ - assert(s); - - if (!(s->options & RES_INIT)) { - int rc = res_ninit(s); - if (rc) return rc; - } - - s->options |= RES_USE_DNSSEC | RES_USE_EDNS0; - - return 0; -} - -inline static int -hs_res_mkquery(struct __res_state *s, const char *dname, int class, int type, unsigned char *req, int reqlen0) -{ - assert(s); - - int reqlen = res_nmkquery(s, QUERY, dname, class, type, NULL, 0, NULL, req, reqlen0); - - assert(reqlen <= reqlen0); - - return reqlen; -} - -inline static int -hs_res_send(struct __res_state *s, const unsigned char *msg, int msglen, unsigned char *answer, int anslen) -{ - assert(s); - - return res_nsend(s, msg, msglen, answer, anslen); -} - -inline static int -hs_res_query(struct __res_state *s, const char *dname, int class, int type, unsigned char *answer, int anslen) -{ - assert(s); - - return res_nquery(s, dname, class, type, answer, anslen); -} - -#else - -/* use non-reentrant API */ - -inline static int -res_opt_set_use_dnssec(void *s) -{ - assert(!s); - - if (!(_res.options & RES_INIT)) { - int rc = res_init(); - if (rc) return rc; - } - - _res.options |= RES_USE_DNSSEC | RES_USE_EDNS0; - - return 0; -} - - -inline static int -hs_res_mkquery(void *s, const char *dname, int class, int type, unsigned char *req, int reqlen0) -{ - assert(!s); - - int reqlen = res_mkquery(QUERY, dname, class, type, NULL, 0, NULL, req, reqlen0); - - assert(reqlen <= reqlen0); - - return reqlen; -} - -inline static int -hs_res_send(void *s, const unsigned char *msg, int msglen, unsigned char *answer, int anslen) -{ - assert(!s); - - return res_send(msg, msglen, answer, anslen); -} - -inline static int -hs_res_query(void *s, const char *dname, int class, int type, unsigned char *answer, int anslen) -{ - assert(!s); - - return res_query(dname, class, type, answer, anslen); -} - -#endif - -#endif /* HS_RESOLV_H */ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/ChangeLog.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/ChangeLog.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/ChangeLog.md 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/ChangeLog.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# Revision history for `resolv` - -## 0.1.1.1 - -* Improve Autoconf script - -## 0.1.1.0 - -* Use Autoconf to detect which library (if any) to link for `res_query(3)` -* Use reentrant `res_nquery(3)` API if available and signal via new `resIsReentrant :: Bool` constant -* Expose `DnsException` and `QR` - -## 0.1.0.0 - -* First version. Released on an unsuspecting world. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/configure cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/configure --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/configure 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,5099 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for resolv 0.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and hvr@gnu.org about -$0: your system, including any error possibly output before -$0: this message. Then install a modern shell, or manually -$0: run the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='resolv' -PACKAGE_TARNAME='resolv' -PACKAGE_VERSION='0.0' -PACKAGE_STRING='resolv 0.0' -PACKAGE_BUGREPORT='hvr@gnu.org' -PACKAGE_URL='' - -ac_unique_file="resolv.cabal" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -EXTRA_LIBS -CPP_OPTIONS -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures resolv 0.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/resolv] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of resolv 0.0:";; - esac - cat <<\_ACEOF - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -resolv configure 0.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------- ## -## Report this to hvr@gnu.org ## -## -------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by resolv $as_me 0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers cbits/hs_resolv_config.h" - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in netinet/in.h arpa/nameser.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" " -#include -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#include - -" -if test "x$ac_cv_header_resolv_h" = xyes; then : - -else - as_fn_error $? "required header not found" "$LINENO" 5 -fi - - - -ac_fn_c_check_decl "$LINENO" "res_query" "ac_cv_have_decl_res_query" " -#include -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#include - -" -if test "x$ac_cv_have_decl_res_query" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_RES_QUERY $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "res_nquery" "ac_cv_have_decl_res_nquery" " -#include -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#include - -" -if test "x$ac_cv_have_decl_res_nquery" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_RES_NQUERY $ac_have_decl -_ACEOF - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5 -$as_echo_n "checking for library containing res_query... " >&6; } -if ${ac_cv_search_res_query+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#include - -int -main () -{ -res_query(0,0,0,0,0) - ; - return 0; -} -_ACEOF -for ac_lib in '' resolv bind; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_res_query=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_res_query+:} false; then : - break -fi -done -if ${ac_cv_search_res_query+:} false; then : - -else - ac_cv_search_res_query=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5 -$as_echo "$ac_cv_search_res_query" >&6; } -ac_res=$ac_cv_search_res_query -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - EXTRA_LIBS="$EXTRA_LIBS $ac_lib" -else - -as_fn_error $? "could not figure out which C library contains res_query(3)" "$LINENO" 5 - -fi - - - - -USE_RES_NQUERY=0 - -if test "x$ac_cv_have_decl_res_nquery" = xyes; then - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct __res_state" >&5 -$as_echo_n "checking size of struct __res_state... " >&6; } -if ${ac_cv_sizeof_struct___res_state+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct __res_state))" "ac_cv_sizeof_struct___res_state" " -#include -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#include - -"; then : - -else - if test "$ac_cv_type_struct___res_state" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (struct __res_state) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_struct___res_state=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct___res_state" >&5 -$as_echo "$ac_cv_sizeof_struct___res_state" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_STRUCT___RES_STATE $ac_cv_sizeof_struct___res_state -_ACEOF - - - -SIZEOF_RES_STATE="$ac_cv_sizeof_struct___res_state" - -if test "$SIZEOF_RES_STATE" -gt 0; then - -USE_RES_NQUERY=1 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_nquery" >&5 -$as_echo_n "checking for library containing res_nquery... " >&6; } -if ${ac_cv_search_res_nquery+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#include - -int -main () -{ -res_nquery(0,0,0,0,0,0) - ; - return 0; -} -_ACEOF -for ac_lib in '' resolv bind; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_res_nquery=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_res_nquery+:} false; then : - break -fi -done -if ${ac_cv_search_res_nquery+:} false; then : - -else - ac_cv_search_res_nquery=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_nquery" >&5 -$as_echo "$ac_cv_search_res_nquery" >&6; } -ac_res=$ac_cv_search_res_nquery -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - EXTRA_LIBS="$EXTRA_LIBS $ac_lib" -else - -USE_RES_NQUERY=0 -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not figure out which C library contains res_nquery(3)" >&5 -$as_echo "$as_me: WARNING: could not figure out which C library contains res_nquery(3)" >&2;} - -fi - - -else - -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine sizeof(struct __res_state)" >&5 -$as_echo "$as_me: WARNING: could not determine sizeof(struct __res_state)" >&2;} - -fi - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which DNS api to use" >&5 -$as_echo_n "checking which DNS api to use... " >&6; } - -case "x$USE_RES_NQUERY" in - x0) { $as_echo "$as_me:${as_lineno-$LINENO}: result: res_query(3)" >&5 -$as_echo "res_query(3)" >&6; } - CPP_OPTIONS="-DUSE_RES_NQUERY=0 -DSIZEOF_RES_STATE=0" - ;; - x1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: res_nquery(3)" >&5 -$as_echo "res_nquery(3)" >&6; } - CPP_OPTIONS="-DUSE_RES_NQUERY=1 -DSIZEOF_RES_STATE=$SIZEOF_RES_STATE" - ;; - *) as_fn_error $? "no suitable DNS API detected" "$LINENO" 5 - ;; -esac - -cat >>confdefs.h <<_ACEOF -#define USE_RES_NQUERY $USE_RES_NQUERY -_ACEOF - - - - -ac_config_files="$ac_config_files resolv.buildinfo" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by resolv $as_me 0.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -resolv config.status 0.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "cbits/hs_resolv_config.h") CONFIG_HEADERS="$CONFIG_HEADERS cbits/hs_resolv_config.h" ;; - "resolv.buildinfo") CONFIG_FILES="$CONFIG_FILES resolv.buildinfo" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/LICENSE cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/LICENSE --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/LICENSE 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/LICENSE 1970-01-01 00:00:00.000000000 +0000 @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/resolv.buildinfo.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/resolv.buildinfo.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/resolv.buildinfo.in 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/resolv.buildinfo.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -extra-libraries: @EXTRA_LIBS@ -cpp-options: @CPP_OPTIONS@ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/resolv.cabal cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/resolv.cabal --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/resolv.cabal 2018-10-17 15:56:43.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/resolv.cabal 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -cabal-version: 1.12 - -name: resolv -version: 0.1.1.1 -x-revision: 3 - -synopsis: Domain Name Service (DNS) lookup via the libresolv standard library routines -description: { - -This package implements an API for accessing -the [Domain Name Service (DNS)](https://tools.ietf.org/html/rfc1035) -resolver service via the standard @libresolv@ system library (whose -API is often available directly via the standard @libc@ C library) on -Unix systems. -. -This package also includes support for decoding message record types -as defined in the following RFCs: -. -- [RFC 1035](https://tools.ietf.org/html/rfc1035): Domain Names - Implementation And Specification -- [RFC 1183](https://tools.ietf.org/html/rfc1183): New DNS RR Definitions -- [RFC 2782](https://tools.ietf.org/html/rfc2782): A DNS RR for specifying the location of services (DNS SRV) -- [RFC 2915](https://tools.ietf.org/html/rfc2915): The Naming Authority Pointer (NAPTR) DNS Resource Record -- [RFC 3596](https://tools.ietf.org/html/rfc3596): DNS Extensions to Support IP Version 6 -- [RFC 4034](https://tools.ietf.org/html/rfc4034): Resource Records for the DNS Security Extensions -- [RFC 4255](https://tools.ietf.org/html/rfc4255): Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints -- [RFC 4408](https://tools.ietf.org/html/rfc4408): Sender Policy Framework (SPF) for Authorizing Use of Domains in E-Mail, Version 1 -- [RFC 5155](https://tools.ietf.org/html/rfc5155): DNS Security (DNSSEC) Hashed Authenticated Denial of Existence -- [RFC 6844](https://tools.ietf.org/html/rfc6844): DNS Certification Authority Authorization (CAA) Resource Record -- [RFC 6891](https://tools.ietf.org/html/rfc6891): Extension Mechanisms for DNS (EDNS(0)) -- [RFC 7553](https://tools.ietf.org/html/rfc7553): The Uniform Resource Identifier (URI) DNS Resource Record - -} - -license: GPL-3 -license-file: LICENSE -author: Herbert Valerio Riedel -maintainer: hvr@gnu.org -category: Network -build-type: Configure -bug-reports: https://github.com/hvr/resolv/issues -extra-source-files: ChangeLog.md - -extra-source-files: cbits/hs_resolv.h - cbits/hs_resolv_config.h.in - testdata/msg/*.bin - testdata/msg/*.show - resolv.buildinfo.in - configure - -extra-tmp-files: autom4te.cache - config.log - config.status - resolv.buildinfo - cbits/hs_resolv_config.h - -tested-with: GHC==8.2.1, GHC==8.0.2, GHC==7.10.3, GHC==7.10.1, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 - -source-repository head - type: git - location: https://github.com/hvr/resolv.git - -library - default-language: Haskell2010 - other-extensions: BangPatterns - CApiFFI - CPP - DeriveDataTypeable - DeriveFoldable - DeriveFunctor - DeriveTraversable - GeneralizedNewtypeDeriving - OverloadedStrings - RecordWildCards - Trustworthy - - hs-source-dirs: src - exposed-modules: Network.DNS - other-modules: Network.DNS.Message - Network.DNS.FFI - Compat - - build-depends: base >= 4.5 && <4.13 - , base16-bytestring == 0.1.* - , binary >= 0.7.3 && < 0.9 - , bytestring >= 0.9.2 && < 0.11 - , containers >= 0.4.2.1 && < 0.7 - - ghc-options: -Wall - include-dirs: cbits - -test-suite resolv. - default-language: Haskell2010 - hs-source-dirs: src-test - main-is: Tests1.hs - type: exitcode-stdio-1.0 - - -- dependencies whose version constraints are inherited via lib:resolv component - build-depends: resolv - , base - , bytestring - - -- additional dependencies not inherited - build-depends: tasty >= 0.11.2 && < 0.12 - , tasty-hunit >= 0.9.2 && < 0.10 - , directory >= 1.1.0.2 && < 1.4 - , filepath >= 1.3.0 && < 1.5 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/Setup.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/Setup.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/Setup.hs 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/Setup.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMainWithHooks autoconfUserHooks diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Compat.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Compat.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Compat.hs 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Compat.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -{-# LANGUAGE CPP #-} - --- | --- Copyright: © 2017 Herbert Valerio Riedel --- License: GPLv3 -module Compat - ( toStrict - , fromStrict - , guard - , replicateM - , unless - , when - , A.Applicative(..) - , (<$>) - , Mon.Monoid(..) - , Foldable - , F.forM_ - , toList - , traverse - , T.Traversable - , module Data.Word - , module Data.Int - , module Data.Maybe - , putInt32be - , getInt32be - ) where - ---import qualified Data.ByteString.Lazy as BSL - -import Control.Applicative as A -import Control.Monad as M -import Data.Binary.Get -import Data.Binary.Put -#if MIN_VERSION_bytestring(0,10,0) -import Data.ByteString.Lazy (fromStrict, toStrict) -#else -import qualified Data.ByteString as BS -import qualified Data.ByteString.Lazy as BS.L -#endif -import Data.Foldable as F -import Data.Int -import Data.Maybe -import Data.Monoid as Mon (Monoid (..)) -import Data.Traversable as T -import Data.Word - -#if !(MIN_VERSION_bytestring(0,10,0)) -fromStrict :: BS.ByteString -> BS.L.ByteString -fromStrict = BS.L.fromChunks . (:[]) - -toStrict :: BS.L.ByteString -> BS.ByteString -toStrict = mconcat . BS.L.toChunks -#endif - -#if !MIN_VERSION_binary(0,8,1) -putInt32be :: Int32 -> Put -putInt32be x = putWord32be (fromIntegral x) - -getInt32be :: Get Int32 -getInt32be = fromIntegral <$> getWord32be -#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Network/DNS/FFI.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Network/DNS/FFI.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Network/DNS/FFI.hs 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Network/DNS/FFI.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -{-# LANGUAGE CApiFFI #-} -{-# LANGUAGE CPP #-} - -module Network.DNS.FFI where - -import Control.Concurrent.MVar -import Foreign.C -import Foreign.Marshal.Alloc -import Foreign.Ptr -import System.IO.Unsafe (unsafePerformIO) - -#if !defined(USE_RES_NQUERY) -# error USE_RES_NQUERY not defined -#endif - -{-# INLINE resIsReentrant #-} --- | Whether the reentrant DNS resolver C API (e.g. @res_nquery(3)@, @res_nsend(3)@) is being used. --- --- If this this 'False', then as a fall-back --- @res_query(3)@/@res_send(3)@ are used, protected by a global mutex. --- --- @since 0.1.1.0 -resIsReentrant :: Bool -#if USE_RES_NQUERY -resIsReentrant = True -#else -resIsReentrant = False -#endif - -#if !defined(SIZEOF_RES_STATE) -# error SIZEOF_RES_STATE not defined -#endif - -#if USE_RES_NQUERY && (SIZEOF_RES_STATE <= 0) -# error broken invariant -#endif - -{-# INLINE sizeOfResState #-} -sizeOfResState :: CSize -sizeOfResState = SIZEOF_RES_STATE - -data CResState - -{-# NOINLINE resolvLock #-} -resolvLock :: MVar () -resolvLock = unsafePerformIO $ newMVar () - -withCResState :: (Ptr CResState -> IO a) -> IO a -withCResState act - | resIsReentrant = allocaBytes (fromIntegral sizeOfResState) $ \ptr -> do - _ <- c_memset ptr 0 sizeOfResState - act ptr - | otherwise = withMVar resolvLock $ \() -> act nullPtr - - --- void *memset(void *s, int c, size_t n); -foreign import capi unsafe "string.h memset" c_memset :: Ptr a -> CInt -> CSize -> IO (Ptr a) - --- int res_query(void *, const char *dname, int class, int type, unsigned char *answer, int anslen); -foreign import capi safe "hs_resolv.h hs_res_query" c_res_query :: Ptr CResState -> CString -> CInt -> CInt -> Ptr CChar -> CInt -> IO CInt - --- int res_send(void *, const unsigned char *msg, int msglen, unsigned char *answer, int anslen); -foreign import capi safe "hs_resolv.h hs_res_send" c_res_send :: Ptr CResState -> Ptr CChar -> CInt -> Ptr CChar -> CInt -> IO CInt - --- int res_opt_set_use_dnssec(void *); -foreign import capi safe "hs_resolv.h res_opt_set_use_dnssec" c_res_opt_set_use_dnssec :: Ptr CResState -> IO CInt - --- int hs_res_mkquery(void *, const char *dname, int class, int type, unsigned char *req, int reqlen0); -foreign import capi safe "hs_resolv.h hs_res_mkquery" c_res_mkquery :: Ptr CResState -> CString -> CInt -> CInt -> Ptr CChar -> CInt -> IO CInt - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Network/DNS/Message.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Network/DNS/Message.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Network/DNS/Message.hs 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Network/DNS/Message.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,1069 +0,0 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE CApiFFI #-} -{-# LANGUAGE DeriveFoldable #-} -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE DeriveTraversable #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} - --- | --- Copyright: © 2017 Herbert Valerio Riedel --- License: GPLv3 --- --- Internal module -module Network.DNS.Message where - -import qualified Data.ByteString.Base16 as B16 - -import qualified Data.ByteString as BS -import qualified Data.ByteString.Lazy as BSL -import Data.Function -import Data.List (groupBy) -import Data.String -import Numeric (showHex) -import Prelude - -import Data.Binary -import Data.Binary.Get -import Data.Binary.Put -import Data.Bits -import Data.Map (Map) -import qualified Data.Map as Map -import Data.Set (Set) -import qualified Data.Set as Set - -import Compat - --- | An IPv6 address --- --- The IP address is represented in network order, --- i.e. @2606:2800:220:1:248:1893:25c8:1946@ is --- represented as @(IPv6 0x2606280002200001 0x248189325c81946)@. -data IPv6 = IPv6 !Word64 !Word64 - deriving (Eq,Ord,Read) - -instance Show IPv6 where - showsPrec p (IPv6 hi lo) = showParen (p >= 11) (showString "IPv6 0x" . showHex hi . showString " 0x" . showHex lo) - -instance Binary IPv6 where - put (IPv6 hi lo) = putWord64be hi >> putWord64be lo - get = IPv6 <$> getWord64be <*> getWord64be - --- | An IPv4 address --- --- The IP address is represented in network order, i.e. @127.0.0.1@ is --- represented as @(IPv4 0x7f000001)@. -data IPv4 = IPv4 !Word32 - deriving (Eq,Ord,Read) - -instance Show IPv4 where - showsPrec p (IPv4 n) = showParen (p >= 11) (showString "IPv4 0x" . showHex n) - -instance Binary IPv4 where - put (IPv4 w) = putWord32be w - get = IPv4 <$> getWord32be - --- | @\@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3). --- --- A domain-name represented as a series of labels separated by dots. --- --- See also 'Labels' for list-based representation. --- --- __NOTE__: The 'Labels' type is able to properly represent domain --- names whose components contain dots which the 'Name' representation --- cannot. -newtype Name = Name BS.ByteString - deriving (Read,Show,Eq,Ord) - --- | @\@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3). --- --- A sequence of up to 255 octets --- --- The limit of 255 octets is caused by the encoding which uses by a --- prefixed octet denoting the length. -newtype CharStr = CharStr BS.ByteString - deriving (Eq,Ord,IsString) - -instance Show CharStr where - showsPrec p (CharStr bs) = showsPrec p bs - -instance Read CharStr where - readsPrec p = map (\(x,y) -> (CharStr x,y)) <$> readsPrec p - -instance Binary CharStr where - put (CharStr bs) - | BS.length bs > 0xff = fail "putString: string too long" - | otherwise = do - putWord8 (fromIntegral $ BS.length bs) - putByteString bs - get = do - len' <- getWord8 - CharStr <$> getByteString (fromIntegral len') - -{- Resource records - - -- https://en.wikipedia.org/wiki/List_of_DNS_record_types - - RFC 1035 - - A 1 a host address - NS 2 an authoritative name server - CNAME 5 the canonical name for an alias - SOA 6 marks the start of a zone of authority - PTR 12 a domain name pointer - MX 15 mail exchange - TXT 16 text strings - - RFC 3596 - - AAAA 28 IPv6 - - RFC 2782 - - SRV 33 Location of services - - ---- - - RFC3597 Handling of Unknown DNS Resource Record (RR) Types - --} - --- | Represents a DNS message as per [RFC 1035](https://tools.ietf.org/html/rfc1035) -data Msg l - = Msg - { msgHeader :: !MsgHeader - , msgQD :: [MsgQuestion l] - , msgAN, msgNS, msgAR :: [MsgRR l] - } deriving (Read,Show,Functor,Foldable,Traversable) - --- | DNS message header section as per [RFC 1035, section 4.1.1](https://tools.ietf.org/html/rfc1035#section-4.1.1) -data MsgHeader - = MsgHeader - { mhId :: !Word16 - - , mhFlags :: !MsgHeaderFlags - - , mhQDCount :: !Word16 - , mhANCount :: !Word16 - , mhNSCount :: !Word16 - , mhARCount :: !Word16 - } deriving (Read,Show) - --- | DNS message header section as per [RFC 1035, section 4.1.2](https://tools.ietf.org/html/rfc1035#section-4.1.2) -data MsgQuestion l - = MsgQuestion !l !Type !Class - deriving (Eq,Read,Show,Functor,Foldable,Traversable) - --- | DNS message header flags as per [RFC 1035, section 4.1.1](https://tools.ietf.org/html/rfc1035#section-4.1.1) -data MsgHeaderFlags - = MsgHeaderFlags - { mhQR :: !QR - , mhOpcode :: !Word8 -- actually Word4 - , mhAA :: !Bool - , mhTC :: !Bool - , mhRD :: !Bool - , mhRA :: !Bool - , mhZ :: !Bool -- reserved/unused bit - , mhAD :: !Bool -- RFC4035 - , mhCD :: !Bool -- RFC4035 - , mhRCode :: !Word8 -- Word4 - } deriving (Read,Show) - --- | DNS resource record section as per [RFC 1035, section 4.1.3](https://tools.ietf.org/html/rfc1035#section-4.1.3) -data MsgRR l - = MsgRR - { rrName :: !l - , rrClass :: !Class - , rrTTL :: !TTL - , rrData :: !(RData l) - } deriving (Eq,Read,Show,Functor,Foldable,Traversable) - --- | DNS resource record data (see also 'MsgRR' and 'TypeSym') -data RData l - = RDataA !IPv4 - | RDataAAAA !IPv6 - | RDataCNAME !l - | RDataPTR !l - | RDataHINFO !CharStr !CharStr - | RDataNS !l - | RDataMX !Word16 !l - | RDataTXT ![CharStr] - | RDataSPF ![CharStr] - | RDataSOA !l !l !Word32 !Word32 !Word32 !Word32 !Word32 - | RDataSRV !(SRV l) - - -- RFC 1183 - | RDataAFSDB !Word16 !l - - -- RFC 2915 - | RDataNAPTR !Word16 !Word16 !CharStr !CharStr !CharStr !l - - -- RFC 7553 - | RDataURI !Word16 !Word16 !BS.ByteString - - -- RFC 4034 - | RDataRRSIG !Word16 !Word8 !Word8 !Word32 !Word32 !Word32 !Word16 !l !BS.ByteString - | RDataDNSKEY !Word16 !Word8 !Word8 !BS.ByteString - | RDataDS !Word16 !Word8 !Word8 !BS.ByteString - | RDataNSEC !l !(Set Type) - - -- RFC 4255 - | RDataSSHFP !Word8 !Word8 !BS.ByteString - - -- RFC 5155 - | RDataNSEC3PARAM !Word8 !Word8 !Word16 !CharStr - | RDataNSEC3 !Word8 !Word8 !Word16 !CharStr !CharStr !(Set Type) - - -- RFC 6844 - | RDataCAA !Word8 !CharStr !BS.ByteString - - -- pseudo-record - | RDataOPT !BS.ByteString -- FIXME - - -- unknown/unsupported - | RData !Type !BS.ByteString -- ^ Unknown/undecoded resource record type - deriving (Eq,Read,Show,Functor,Foldable,Traversable) - - --- | @SRV@ Record data as per [RFC 2782](https://tools.ietf.org/html/rfc2782) -data SRV l = SRV { srvPriority :: !Word16 - , srvWeight :: !Word16 - , srvPort :: !Word16 - , srvTarget :: !l - } deriving (Eq,Read,Show,Functor,Foldable,Traversable) - ----------------------------------------------------------------------------- - -decodeMessage' :: BS.ByteString -> Maybe (Msg Labels) -decodeMessage' bs = do - (rest, _, v) <- either handleParseFail Just $ - decodeOrFail (fromStrict bs) - - -- don't allow trailing garbage - guard (BSL.null rest) - - let ofss = Set.fromList $ mapMaybe labelsPtr (toList v) - ofsmap <- retrieveLabelPtrs bs ofss - - traverse (resolveLabelPtr ofsmap) v - where - -- handleParseFail _ = Nothing - handleParseFail (rest, n, e) = error $ show (e, n, BSL.length rest, BS.length bs) ++ "\n" ++ show (B16.encode $ toStrict rest) - --- | Decode a raw DNS message (query or response) --- --- Returns 'Nothing' on decoding failures. -decodeMessage :: IsLabels n => BS.ByteString -> Maybe (Msg n) -decodeMessage = fmap (fmap fromLabels) . decodeMessage' - -encodeMessage' :: Msg Labels -> BS.ByteString -encodeMessage' m = toStrict $ encode (fmap labels2labelsPtr m) - --- | Construct a raw DNS message (query or response) --- --- May return 'Nothing' in input parameters are detected to be invalid. -encodeMessage :: IsLabels n => Msg n -> Maybe BS.ByteString -encodeMessage m = encodeMessage' <$> traverse toLabels m - - -instance Binary l => Binary (Msg l) where - get = do - hdr@MsgHeader{..} <- get - - Msg hdr <$> replicateM (fromIntegral mhQDCount) get - <*> replicateM (fromIntegral mhANCount) get - <*> replicateM (fromIntegral mhNSCount) get - <*> replicateM (fromIntegral mhARCount) get - - put (Msg hdr qds ans nss ars) = do - put hdr - mapM_ put qds - mapM_ put ans - mapM_ put nss - mapM_ put ars - -instance Binary MsgHeader where - get = MsgHeader <$> getWord16be - <*> get - <*> getWord16be - <*> getWord16be - <*> getWord16be - <*> getWord16be - - put (MsgHeader{..}) = do - putWord16be mhId - put mhFlags - putWord16be mhQDCount - putWord16be mhANCount - putWord16be mhNSCount - putWord16be mhARCount - -instance Binary MsgHeaderFlags where - put = putWord16be . encodeFlags - get = decodeFlags <$> getWord16be - --- | Decode message header flag field --- --- > +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ --- > |QR| Opcode |AA|TC|RD|RA|??|AD|CD| RCODE | --- > +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ --- -decodeFlags :: Word16 -> MsgHeaderFlags -decodeFlags w = MsgHeaderFlags{..} - where - mhQR = if testBit w 15 then IsResponse else IsQuery - mhOpcode = shiftR' 11 .&. 0xf - mhAA = testBit w 10 - mhTC = testBit w 9 - mhRD = testBit w 8 - mhRA = testBit w 7 - mhZ = testBit w 6 - mhAD = testBit w 5 - mhCD = testBit w 4 - mhRCode = fromIntegral w .&. 0xf - - shiftR' = fromIntegral . shiftR w - -encodeFlags :: MsgHeaderFlags -> Word16 -encodeFlags MsgHeaderFlags{..} = - (case mhQR of - IsResponse -> bit 15 - IsQuery -> 0) .|. - (fromIntegral mhOpcode `shiftL` 11) .|. - (if mhAA then bit 10 else 0) .|. - (if mhTC then bit 9 else 0) .|. - (if mhRD then bit 8 else 0) .|. - (if mhRA then bit 7 else 0) .|. - (if mhZ then bit 6 else 0) .|. - (if mhAD then bit 5 else 0) .|. - (if mhCD then bit 4 else 0) .|. - (fromIntegral mhRCode) - --- | Encodes whether message is a query or a response --- --- @since 0.1.1.0 -data QR = IsQuery | IsResponse - deriving (Eq,Read,Show) - ----------------------------------------------------------------------------- - -infixr 5 :.: - --- | A DNS Label --- --- Must be non-empty and at most 63 octets. -type Label = BS.ByteString - --- | A @@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3) expressed as list of 'Label's. --- --- See also 'Name' -data Labels = !Label :.: !Labels | Root - deriving (Read,Show,Eq,Ord) - -labelsToList :: Labels -> [Label] -labelsToList (x :.: xs) = x : labelsToList xs -labelsToList Root = [""] - --- | Types that represent @@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3) and can be converted to and from 'Labels'. -class IsLabels s where - toLabels :: s -> Maybe Labels - fromLabels :: Labels -> s - -instance IsLabels Labels where - fromLabels = id - - toLabels ls - | all isLabelValid (init (labelsToList ls)) = Just ls - | otherwise = Nothing - where - isLabelValid l = not (BS.null l) && BS.length l < 0x40 - -instance IsLabels Name where - fromLabels = labels2name - toLabels = name2labels - -toName :: IsLabels n => n -> Maybe Name -toName = fmap fromLabels . toLabels - -name2labels :: Name -> Maybe Labels -name2labels (Name n) - | all (\l -> not (BS.null l) && BS.length l < 0x40) n' = Just $! foldr (:.:) Root n' - | otherwise = Nothing - where - n' | BS.isSuffixOf "." n = BS.split 0x2e (BS.init n) - | otherwise = BS.split 0x2e n - -labels2name :: Labels -> Name -labels2name Root = Name "." -labels2name ls = Name (BS.intercalate "." $ labelsToList ls) - --- | IOW, a domain-name --- --- May contain pointers --- --- Can be resolved into a 'Labels' without label ptrs. -data LabelsPtr = Label !Label !LabelsPtr -- ^ See RC2181: a label must be between 1-63 octets; can be arbitrary binary data - | LPtr !Word16 - | LNul - deriving (Eq,Read,Show) - -labels2labelsPtr :: Labels -> LabelsPtr -labels2labelsPtr Root = LNul -labels2labelsPtr (l :.: rest) = Label l (labels2labelsPtr rest) - -instance Binary LabelsPtr where - get = go [] - where - go acc = do - l0 <- getLabel - case l0 of - Right bs | BS.null bs -> pure (foldr Label LNul $ reverse acc) - | otherwise -> go (bs:acc) - Left ofs -> pure (foldr Label (LPtr ofs) $ reverse acc) - - getLabel :: Get (Either Word16 BS.ByteString) - getLabel = do - len <- getWord8 - - if len >= 0x40 - then do - when (len .&. 0xc0 /= 0xc0) $ fail ("invalid length octet " ++ show len) - ofs <- fromIntegral <$> getWord8 - pure $ Left $ (fromIntegral (len .&. 0x3f) `shiftL` 8) .|. ofs - else Right <$> getByteString (fromIntegral len) - - put LNul = putWord8 0 - put (Label l next) - | BS.length l < 1 || BS.length l >= 0x40 = error "put (Label {}): invalid label size" - | otherwise = do - putWord8 (fromIntegral (BS.length l)) - putByteString l - put next - put (LPtr ofs) - | ofs < 0x4000 = putWord16be (0xc000 .|. ofs) - | otherwise = error "put (LPtr {}): invalid offset" - --- | Compute serialised size of 'LabelsPtr' -labelsSize :: LabelsPtr -> Word16 -labelsSize = fromIntegral . go 0 - where - go n (LPtr _) = n+2 - go n LNul = n+1 - go n (Label bs rest) = go (n + 1 + BS.length bs) rest - --- | Extract pointer-offset from 'LabelsPtr' (if it exists) -labelsPtr :: LabelsPtr -> Maybe Word16 -labelsPtr (Label _ ls) = labelsPtr ls -labelsPtr LNul = Nothing -labelsPtr (LPtr ofs) = Just ofs - ----------------------------------------------------------------------------- - -instance Binary l => Binary (MsgQuestion l) where - get = MsgQuestion <$> get <*> get <*> get - put (MsgQuestion l qt cls) = put l >> put qt >> put cls - - -instance Binary l => Binary (MsgRR l) where - get = do - rrName <- get - rrType <- get - rrClass <- get - rrTTL <- get - rrData <- getRData rrType - pure (MsgRR {..}) - - put (MsgRR{..}) = do - put rrName - put (either id typeFromSym $ rdType rrData) - put rrClass - put rrTTL - putRData rrData - -getRData :: Binary l => Type -> Get (RData l) -getRData qt = do - len <- fromIntegral <$> getWord16be - - let unknownRdata = RData qt <$> getByteString len - - getByteStringRest = consumeRestWith getByteString - - consumeRestWith act = do - curofs <- fromIntegral <$> bytesRead - act (len - curofs) - - isolate len $ - case typeToSym qt of - Nothing -> unknownRdata - Just ts -> case ts of - TypeA -> RDataA <$> get - - TypeAFSDB -> RDataAFSDB <$> getWord16be - <*> get - - TypeNS -> RDataNS <$> get - - TypeCNAME -> RDataCNAME <$> get - - TypeSOA -> RDataSOA <$> get - <*> get - <*> getWord32be - <*> getWord32be - <*> getWord32be - <*> getWord32be - <*> getWord32be - - TypePTR -> RDataPTR <$> get - - TypeHINFO -> RDataHINFO <$> get - <*> get - - TypeMX -> RDataMX <$> getWord16be - <*> get - - TypeTXT -> RDataTXT <$> getUntilEmpty - TypeSPF -> RDataSPF <$> getUntilEmpty - - TypeAAAA -> RDataAAAA <$> get - - TypeSRV -> RDataSRV <$> get - - TypeNAPTR -> RDataNAPTR <$> getWord16be -- order - <*> getWord16be --preference - <*> get -- flags - <*> get -- services - <*> get -- regexp - <*> get -- replacement - - TypeRRSIG -> RDataRRSIG <$> getWord16be - <*> getWord8 - <*> getWord8 - <*> getWord32be - <*> getWord32be - <*> getWord32be - <*> getWord16be - <*> get -- uncompressed - <*> getByteStringRest - - TypeDNSKEY -> RDataDNSKEY <$> getWord16be - <*> getWord8 - <*> getWord8 - <*> getByteString (len - 4) - - TypeDS -> RDataDS <$> getWord16be - <*> getWord8 - <*> getWord8 - <*> getByteString (len - 4) - - TypeNSEC -> RDataNSEC <$> get - <*> decodeNsecTypeMap - - TypeURI -> RDataURI <$> getWord16be -- prio - <*> getWord16be -- weight - <*> getByteString (len - 4) - - TypeSSHFP -> RDataSSHFP <$> getWord8 - <*> getWord8 - <*> getByteString (len - 2) - - TypeNSEC3PARAM -> RDataNSEC3PARAM <$> getWord8 - <*> getWord8 - <*> getWord16be - <*> get -- salt - - TypeNSEC3 -> RDataNSEC3 <$> getWord8 - <*> getWord8 - <*> getWord16be - <*> get -- salt - <*> get -- next hashed owner name - <*> decodeNsecTypeMap - - TypeCAA -> RDataCAA <$> getWord8 -- flags - <*> get -- tag -- TODO: must be non-empty - <*> getByteStringRest - - TypeOPT -> RDataOPT <$> getByteString len -- FIXME - - TypeANY -> unknownRdata -- shouldn't happen - -putRData :: Binary l => RData l -> Put -putRData rd = do - let rdata = runPut (putRData' rd) - rdataLen = BSL.length rdata - - unless (rdataLen < 0x10000) $ - fail "rdata too large" - - putWord16be (fromIntegral rdataLen) - putLazyByteString rdata - -putRData' :: Binary l => RData l -> Put -putRData' rd = case rd of - RDataA ip4 -> put ip4 - RDataAAAA ip6 -> put ip6 - RDataCNAME cname -> put cname - RDataOPT d -> putByteString d - RDataMX prio l -> putWord16be prio >> put l - RDataSOA l1 l2 w1 w2 w3 w4 w5 -> do - put l1 - put l2 - putWord32be w1 - putWord32be w2 - putWord32be w3 - putWord32be w4 - putWord32be w5 - - RDataPTR l -> put l - RDataNS l -> put l - RDataTXT ss -> mapM_ put ss - RDataSPF ss -> mapM_ put ss - RDataSRV srv -> put srv - - RDataAFSDB w l -> putWord16be w >> put l - - RDataHINFO s1 s2 -> put s1 >> put s2 - - RDataRRSIG w1 w2 w3 w4 w5 w6 w7 l s -> do - putWord16be w1 - putWord8 w2 - putWord8 w3 - putWord32be w4 - putWord32be w5 - putWord32be w6 - putWord16be w7 - put l - putByteString s - - RDataDNSKEY w1 w2 w3 s -> do - putWord16be w1 - putWord8 w2 - putWord8 w3 - putByteString s - - RDataNSEC3PARAM w1 w2 w3 s -> do - putWord8 w1 - putWord8 w2 - putWord16be w3 - put s - - RDataNSEC3 w1 w2 w3 s1 s2 tm -> do - putWord8 w1 - putWord8 w2 - putWord16be w3 - put s1 - put s2 - encodeNsecTypeMap tm - - RDataCAA fl s1 s2 -> do - putWord8 fl - put s1 - putByteString s2 - - RDataURI w1 w2 s -> do - putWord16be w1 - putWord16be w2 - putByteString s - - RDataDS w1 w2 w3 s -> do - putWord16be w1 - putWord8 w2 - putWord8 w3 - putByteString s - - RDataNSEC l tm -> do - put l - encodeNsecTypeMap tm - - RDataNAPTR w1 w2 s1 s2 s3 l -> do - putWord16be w1 - putWord16be w2 - put s1 - put s2 - put s3 - put l - - RDataSSHFP w1 w2 s -> do - putWord8 w1 - putWord8 w2 - putByteString s - - RData _ raw -> putByteString raw - - -- _ -> error ("putRData: " ++ show rd) - - -instance Binary l => Binary (SRV l) where - get = SRV <$> getWord16be - <*> getWord16be - <*> getWord16be - <*> get - - put (SRV w1 w2 w3 l) = do - putWord16be w1 - putWord16be w2 - putWord16be w3 - put l - -{- NSEC type-bitmap example: - - A NS SOA TXT AAAA RRSIG NSEC DNSKEY - -'00 07 62 00 80 08 00 03 80' -'00000000 00000111 01100010 00000000 10000000 00001000 00000000 00000011 10000000' - Win=#0 len=7 ^{SOA} ^{TXT} ^{AAAA} ^{DNSKEY} - ^^{A,NS} ^^{RRSIG,NSEC} --} - -decodeNsecTypeMap :: Get (Set Type) -decodeNsecTypeMap = do - r <- concat <$> untilEmptyWith decode1 - -- TODO: enforce uniqueness - pure (Set.fromList r) - where - -- decode single window - decode1 = do - wi <- getWord8 - l <- getWord8 - unless (0 < l && l <= 32) $ - fail "invalid bitmap length" - - bmap <- getByteString (fromIntegral l) - - let winofs = (fromIntegral wi)*0x100 :: Int - lst = [ Type (fromIntegral (winofs+j*8+7-i)) - | (j,x) <- zip [0..] (BS.unpack bmap) - , i <- [7,6..0] - , testBit x i ] - - pure lst - -encodeNsecTypeMap :: Set Type -> Put -encodeNsecTypeMap bmap = do - when (Set.null bmap) $ fail "invalid empty type-map" - -- when (Set.member 0 bmap) $ fail "invalid TYPE0 set in type-map" - -- TODO: verify that Meta-TYPES and QTYPEs aren't contained in bmap - - forM_ (Map.toList bmap') $ \(wi, tm) -> do - putWord8 wi - put (CharStr $ BS.pack tm) - where - bmap' = fmap set2bitmap . splitToBlocks $ Set.map (\(Type w)->w) bmap - -set2bitmap :: Set Word8 -> [Word8] -set2bitmap = go 0 0 . Set.toList - where - go _ acc [] = if acc == 0 then [] else [acc] - go j acc (i:is) - | j' > j = acc : go (j+1) 0 (i:is) - | j' == j = go j' (acc .|. bit (7 - fromIntegral i')) is - | otherwise = error "set2bitmap: the impossible happened" - where - (j',i') = i `quotRem` 8 - -splitToBlocks :: Set Word16 -> Map Word8 (Set Word8) -splitToBlocks js = Map.fromList $ map (\xs -> (fst $ head xs, Set.fromList (map snd xs))) js' - where - hi16 :: Word16 -> Word8 - hi16 = fromIntegral . flip shiftR 8 - - lo16 :: Word16 -> Word8 - lo16 = fromIntegral . (.&. 0xff) - - js' :: [[(Word8,Word8)]] - js' = groupBy ((==) `on` fst) (map ((,) <$> hi16 <*> lo16) (Set.toList js)) - - --- | Resolves/parses label pointer used for label compressing --- --- Returns 'Nothing' on failure -retrieveLabelPtr :: BS.ByteString -> Word16 -> Maybe LabelsPtr -retrieveLabelPtr msg ofs - = case decodeOrFail (fromStrict $ BS.drop (fromIntegral ofs) msg) of - Left _ -> Nothing - Right (_, _, v) -> Just v - --- | Resolve set of label pointer offsets --- --- Invariants (/iff/ result is not 'Nothing') --- --- * all requested offsets will be contained in the result map --- --- * any offsets contained in the resolved 'Labels' will be part of --- the result map as well --- --- NB: No cycle detection is performed, nor are 'Labels' flattened -retrieveLabelPtrs :: BS.ByteString -> Set Word16 -> Maybe (Map Word16 LabelsPtr) -retrieveLabelPtrs msg ofss0 = go =<< lupPtrs1 ofss0 - where - go :: Map Word16 LabelsPtr -> Maybe (Map Word16 LabelsPtr) - go m0 = do - let missingOfss = Set.fromList (mapMaybe labelsPtr (toList m0)) Set.\\ Map.keysSet m0 - - if Set.null missingOfss - then pure m0 -- fix-point reached - else do - m1 <- lupPtrs1 missingOfss - go (Map.union m0 m1) - - -- single lookup step - lupPtrs1 :: Set Word16 -> Maybe (Map Word16 LabelsPtr) - lupPtrs1 ofss1 = Map.fromList . zip (toList ofss1) <$> traverse (retrieveLabelPtr msg) (toList ofss1) - --- | Checks for maximum name length (255) and (therefore indirectly) cycle-checking -resolveLabelPtr :: Map Word16 LabelsPtr -> LabelsPtr -> Maybe Labels -resolveLabelPtr ofsmap = go 0 [] - where - go :: Int -> [BS.ByteString] -> LabelsPtr -> Maybe Labels - go !n acc (Label x ls) = go (n+1+BS.length x) (x:acc) ls - go n acc LNul - | n < 255 = Just $! foldr (:.:) Root (reverse acc) - | otherwise = Nothing -- length violation - go n acc (LPtr ofs) - | n < 255 = go n acc =<< lup ofs - | otherwise = Nothing - - lup :: Word16 -> Maybe LabelsPtr - lup ofs = Map.lookup ofs ofsmap - - -{- Resource records - - -- https://en.wikipedia.org/wiki/List_of_DNS_record_types - - RFC 1035 - - A 1 a host address - NS 2 an authoritative name server - CNAME 5 the canonical name for an alias - SOA 6 marks the start of a zone of authority - PTR 12 a domain name pointer - MX 15 mail exchange - TXT 16 text strings - - RFC 3596 - - AAAA 28 IPv6 - - RFC 2782 - - SRV 33 Location of services - - ---- - - RFC3597 Handling of Unknown DNS Resource Record (RR) Types - --} - --- | Raw DNS record type code --- --- See also 'TypeSym' -newtype Type = Type Word16 - deriving (Eq,Ord,Read,Show) - -instance Binary Type where - put (Type w) = putWord16be w - get = Type <$> getWord16be - --- | DNS @CLASS@ code as per [RFC 1035, section 3.2.4](https://tools.ietf.org/html/rfc1035#section-3.2.4) --- --- The most commonly used value is 'classIN'. -newtype Class = Class Word16 - deriving (Eq,Ord,Read,Show) - --- | The 'Class' constant for @IN@ (Internet) -classIN :: Class -classIN = Class 1 - -instance Binary Class where - put (Class w) = putWord16be w - get = Class <$> getWord16be - --- | Cache time-to-live expressed in seconds -newtype TTL = TTL Int32 - deriving (Eq,Ord,Read,Show) - -instance Binary TTL where - put (TTL i) = putInt32be i - get = TTL <$> getInt32be - --- http://www.bind9.net/dns-parameters - --- | Symbolic DNS record type -data TypeSym - = TypeA -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeAAAA -- ^ [RFC 3596](https://tools.ietf.org/html/rfc3596) - | TypeAFSDB -- ^ [RFC 1183](https://tools.ietf.org/html/rfc1183) - | TypeANY -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) (query) - | TypeCAA -- ^ [RFC 6844](https://tools.ietf.org/html/rfc6844) - | TypeCNAME -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeDNSKEY -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) - | TypeDS -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) - | TypeHINFO -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeMX -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeNAPTR -- ^ [RFC 2915](https://tools.ietf.org/html/rfc2915) - | TypeNS -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeNSEC -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) - | TypeNSEC3 -- ^ [RFC 5155](https://tools.ietf.org/html/rfc5155) - | TypeNSEC3PARAM -- ^ [RFC 5155](https://tools.ietf.org/html/rfc5155) - | TypeOPT -- ^ [RFC 6891](https://tools.ietf.org/html/rfc6891) (meta) - | TypePTR -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeRRSIG -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) - | TypeSOA -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeSPF -- ^ [RFC 4408](https://tools.ietf.org/html/rfc4408) - | TypeSRV -- ^ [RFC 2782](https://tools.ietf.org/html/rfc2782) - | TypeSSHFP -- ^ [RFC 4255](https://tools.ietf.org/html/rfc4255) - | TypeTXT -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) - | TypeURI -- ^ [RFC 7553](https://tools.ietf.org/html/rfc7553) - deriving (Eq,Ord,Enum,Bounded,Read,Show) - --- | Convert symbolic 'TypeSym' to numeric 'Type' code -typeFromSym :: TypeSym -> Type -typeFromSym ts = Type $ case ts of - TypeA -> 1 - TypeNS -> 2 - TypeCNAME -> 5 - TypeSOA -> 6 - TypePTR -> 12 - TypeHINFO -> 13 - TypeMX -> 15 - TypeTXT -> 16 - TypeAFSDB -> 18 - TypeAAAA -> 28 - TypeSRV -> 33 - TypeNAPTR -> 35 - TypeOPT -> 41 - TypeDS -> 43 - TypeSSHFP -> 44 - TypeRRSIG -> 46 - TypeNSEC -> 47 - TypeDNSKEY -> 48 - TypeNSEC3 -> 50 - TypeNSEC3PARAM -> 51 - TypeSPF -> 99 - TypeANY -> 255 - TypeURI -> 256 - TypeCAA -> 257 - --- | Convert 'Type' code to symbolic 'TypeSym' -typeToSym :: Type -> Maybe TypeSym -typeToSym (Type w) = case w of - 1 -> Just TypeA - 2 -> Just TypeNS - 5 -> Just TypeCNAME - 6 -> Just TypeSOA - 12 -> Just TypePTR - 13 -> Just TypeHINFO - 15 -> Just TypeMX - 16 -> Just TypeTXT - 18 -> Just TypeAFSDB - 28 -> Just TypeAAAA - 33 -> Just TypeSRV - 35 -> Just TypeNAPTR - 41 -> Just TypeOPT - 43 -> Just TypeDS - 44 -> Just TypeSSHFP - 46 -> Just TypeRRSIG - 47 -> Just TypeNSEC - 48 -> Just TypeDNSKEY - 50 -> Just TypeNSEC3 - 51 -> Just TypeNSEC3PARAM - 99 -> Just TypeSPF - 255 -> Just TypeANY - 256 -> Just TypeURI - 257 -> Just TypeCAA - _ -> Nothing - --- | Extract the resource record type of a 'RData' object -rdType :: RData l -> Either Type TypeSym -rdType rd = case rd of - RDataA {} -> Right TypeA - RDataAAAA {} -> Right TypeAAAA - RDataAFSDB {} -> Right TypeAFSDB - RDataCAA {} -> Right TypeCAA - RDataCNAME {} -> Right TypeCNAME - RDataDNSKEY {} -> Right TypeDNSKEY - RDataDS {} -> Right TypeDS - RDataHINFO {} -> Right TypeHINFO - RDataMX {} -> Right TypeMX - RDataNAPTR {} -> Right TypeNAPTR - RDataNS {} -> Right TypeNS - RDataNSEC {} -> Right TypeNSEC - RDataNSEC3 {} -> Right TypeNSEC3 - RDataNSEC3PARAM {} -> Right TypeNSEC3PARAM - RDataOPT {} -> Right TypeOPT - RDataPTR {} -> Right TypePTR - RDataRRSIG {} -> Right TypeRRSIG - RDataSOA {} -> Right TypeSOA - RDataSRV {} -> Right TypeSRV - RDataTXT {} -> Right TypeTXT - RDataSPF {} -> Right TypeSPF - RDataURI {} -> Right TypeURI - RDataSSHFP {} -> Right TypeSSHFP - -- - RData ty _ -> maybe (Left ty) Right (typeToSym ty) - - -{- TODO: - - -type-bitmap: - - A NS SOA TXT AAAA RRSIG NSEC DNSKEY - -'00 07 62 00 80 08 00 03 80' -'00000000 00000111 01100010 00000000 10000000 00001000 00000000 00000011 10000000' - Win=#0 len=7 ^{SOA} ^{TXT} ^{AAAA} ^{DNSKEY} - ^^{A,NS} ^^{RRSIG,NSEC} - -" ".join(map("{:08b}".format,[0,7,98,0,128,8,0,3,128])) - - -"\NUL\a\"\NUL\NUL\NUL\NUL\ETX\128" NS SOA RRSIG NSEC DNSKEY - -[ (winofs+j*8+7-i) | (j,x) <- zip [0..] xs, i <- [7,6..0], testBit x i ] - --} - - - --- helpers - -getUntilEmpty :: Binary a => Get [a] -getUntilEmpty = untilEmptyWith get - -untilEmptyWith :: Get a -> Get [a] -untilEmptyWith g = go [] - where - go acc = do - e <- isEmpty - if e - then pure (reverse acc) - else do - v <- g - go (v : acc) - - - -{- TODO: - - - MsgRR{rrName = Name "stanford.edu.", rrClass = 1, rrTTL = 1799, - rrData = - RData 29 - "\NUL\DC2\SYN\DC3\136\a\244\212e\200\252\194\NUL\152\150\128"}, - - -https://en.wikipedia.org/wiki/LOC_record - - -LOC record statdns.net. IN LOC 52 22 23.000 N 4 53 32.000 E -2.00m 0.00m 10000m 10m - - -SW1A2AA.find.me.uk. 86399 IN LOC 51 30 12.748 N 0 7 39.611 W 0.00m 0.00m 0.00m 0.00m - - -https://tools.ietf.org/html/rfc1876 - --} - diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Network/DNS.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Network/DNS.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src/Network/DNS.hs 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src/Network/DNS.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,373 +0,0 @@ -{-# LANGUAGE CApiFFI #-} -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE Trustworthy #-} - --- | --- Copyright: © 2017 Herbert Valerio Riedel --- License: GPLv3 --- --- This module implements an API for accessing --- the [Domain Name Service (DNS)](https://tools.ietf.org/html/rfc1035) --- resolver service via the standard @libresolv@ system library --- on Unix systems. --- -module Network.DNS - ( -- ** High level API - queryA - , queryAAAA - , queryCNAME - , querySRV - , queryTXT - - -- * Mid-level API - , query - , DnsException(..) - - -- * Low-level API - , resIsReentrant - , queryRaw - , sendRaw - , mkQueryRaw - - , decodeMessage - , encodeMessage - , mkQueryMsg - - -- * Types - -- ** Basic types - - -- *** Names/Labels - , Label - , Labels(..) - , IsLabels(..) - - , Name(..) - , caseFoldName - - -- *** Character strings - , CharStr(..) - - -- *** IP addresses - , IPv4(..) - , IPv6(..) - - -- *** RR TTL & Class - , TTL(..) - - , Class(..) - , classIN - - -- *** Message types - , Type(..) - , TypeSym(..) - , typeFromSym - , typeToSym - - -- ** Messages - - , Msg(..) - - , MsgHeader(..) - , MsgHeaderFlags(..), QR(..) - , MsgQuestion(..) - , MsgRR(..) - - , RData(..) - , rdType - - , SRV(..) - ) - where - -import Control.Exception -import Data.Typeable (Typeable) -import Foreign.C -import Foreign.Marshal.Alloc -import Prelude - -import qualified Data.ByteString as BS - -import Compat - -import Network.DNS.FFI -import Network.DNS.Message - --- | Exception thrown in case of errors while encoding or decoding into a 'Msg'. --- --- @since 0.1.1.0 -data DnsException = DnsEncodeException - | DnsDecodeException - deriving (Show, Typeable) - -instance Exception DnsException - --- | Send a query via @res_query(3)@ and decode its response into a 'Msg' --- --- Throws 'DnsException' in case of encoding or decoding errors. May throw other IO exceptions in case of network errors. --- --- === Example --- --- >>> query classIN (Name "_mirrors.hackage.haskell.org") TypeTXT --- Just (Msg{msgHeader = MsgHeader{mhId = 56694, --- mhFlags = MsgHeaderFlags{mhQR = IsResponse, mhOpcode = 0, mhAA = False, --- mhTC = False, mhRD = True, mhRA = True, mhZ = False, --- mhAD = False, mhCD = False, mhRCode = 0}, --- mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, --- msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 16) (Class 1)], --- msgAN = [MsgRR{rrName = Name "_mirrors.hackage.haskell.org.", --- rrClass = Class 1, rrTTL = TTL 299, --- rrData = RDataTXT ["0.urlbase=http://hackage.fpcomplete.com/", --- "1.urlbase=http://objects-us-west-1.dream.io/hackage-mirror/"]}], --- msgNS = [], --- msgAR = [MsgRR{rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}] --- }) --- -query :: IsLabels n => Class -> n -> TypeSym -> IO (Msg n) -query cls name0 qtype - | Just name <- toName name0 = do - bs <- queryRaw cls name (typeFromSym qtype) - msg <- evaluate (decodeMessage bs) - maybe (throwIO DnsDecodeException) pure msg - | otherwise = throwIO DnsEncodeException - --- | Send a query via @res_query(3)@, the return value is the raw binary response message. --- --- You can use 'decodeMessage' to decode the response message. -queryRaw :: Class -> Name -> Type -> IO BS.ByteString -queryRaw (Class cls) (Name name) qtype = withCResState $ \stptr -> do - allocaBytes max_msg_size $ \resptr -> do - _ <- c_memset resptr 0 max_msg_size - BS.useAsCString name $ \dn -> do - - rc1 <- c_res_opt_set_use_dnssec stptr - unless (rc1 == 0) $ - fail "res_init(3) failed" - - resetErrno - reslen <- c_res_query stptr dn (fromIntegral cls) qtypeVal resptr max_msg_size - - unless (reslen <= max_msg_size) $ - fail "res_query(3) message size overflow" - - errno <- getErrno - - when (reslen < 0) $ do - unless (errno == eOK) $ - throwErrno "res_query" - - fail "res_query(3) failed" - - BS.packCStringLen (resptr, fromIntegral reslen) - - where - -- The DNS protocol is inherently 16-bit-offset based; so 64KiB is - -- a reasonable maximum message size most implementations seem to - -- support. - max_msg_size :: Num a => a - max_msg_size = 0x10000 - - qtypeVal :: CInt - qtypeVal = case qtype of Type w -> fromIntegral w - --- | Send a raw preformatted query via @res_send(3)@. -sendRaw :: BS.ByteString -> IO BS.ByteString -sendRaw req = withCResState $ \stptr -> do - allocaBytes max_msg_size $ \resptr -> do - _ <- c_memset resptr 0 max_msg_size - BS.useAsCStringLen req $ \(reqptr,reqlen) -> do - rc1 <- c_res_opt_set_use_dnssec stptr - unless (rc1 == 0) $ - fail "res_init(3) failed" - - resetErrno - reslen <- c_res_send stptr reqptr (fromIntegral reqlen) resptr max_msg_size - - unless (reslen <= max_msg_size) $ - fail "res_send(3) message size overflow" - - errno <- getErrno - - when (reslen < 0) $ do - unless (errno == eOK) $ - throwErrno "res_send" - - fail "res_send(3) failed" - - BS.packCStringLen (resptr, fromIntegral reslen) - - where - -- The DNS protocol is inherently 16-bit-offset based; so 64KiB is - -- a reasonable maximum message size most implementations seem to - -- support. - max_msg_size :: Num a => a - max_msg_size = 0x10000 - --- | Construct a DNS query 'Msg' in the style of 'mkQueryRaw' -mkQueryMsg :: IsLabels n => Class -> n -> Type -> Msg n -mkQueryMsg cls l qtype = Msg (MsgHeader{..}) - [MsgQuestion l qtype cls] - [] - [] - [MsgRR {..}] - where - mhId = 31337 - mhFlags = MsgHeaderFlags - { mhQR = IsQuery - , mhOpcode = 0 - , mhAA = False - , mhTC = False - , mhRD = True - , mhRA = False - , mhZ = False - , mhAD = True - , mhCD = False - , mhRCode = 0 - } - - mhQDCount = 1 - mhANCount = 0 - mhNSCount = 0 - mhARCount = 1 - - rrName = fromLabels Root - rrClass = Class 512 - rrTTL = TTL 0x8000 - rrData = RDataOPT "" - - - --- | Use @res_mkquery(3)@ to construct a DNS query message. -mkQueryRaw :: Class -> Name -> Type -> IO BS.ByteString -mkQueryRaw (Class cls) (Name name) qtype = withCResState $ \stptr -> do - allocaBytes max_msg_size $ \resptr -> do - _ <- c_memset resptr 0 max_msg_size - BS.useAsCString name $ \dn -> do - - rc1 <- c_res_opt_set_use_dnssec stptr - unless (rc1 == 0) $ - fail "res_init(3) failed" - - resetErrno - reslen <- c_res_mkquery stptr dn (fromIntegral cls) qtypeVal resptr max_msg_size - - unless (reslen <= max_msg_size) $ - fail "res_mkquery(3) message size overflow" - - errno <- getErrno - - when (reslen < 0) $ do - unless (errno == eOK) $ - throwErrno "res_query" - - fail "res_mkquery(3) failed" - - BS.packCStringLen (resptr, fromIntegral reslen) - - where - -- The DNS protocol is inherently 16-bit-offset based; so 64KiB is - -- a reasonable maximum message size most implementations seem to - -- support. - max_msg_size :: Num a => a - max_msg_size = 0x10000 - - qtypeVal :: CInt - qtypeVal = case qtype of Type w -> fromIntegral w - - ----------------------------------------------------------------------------- --- Common High-level queries - --- | Normalise 'Name' --- --- This function case folds 'Name's as described in --- in [RFC 4343, section 3](https://tools.ietf.org/html/rfc4343#section-3) --- by subtracting @0x20@ from all octets in the inclusive range --- @[0x61..0x7A]@ (i.e. mapping @['a'..'z']@ to @['A'..'Z']@). --- --- This operation is idempotent. -caseFoldName :: Name -> Name -caseFoldName (Name n) = (Name n'') - where - n' = BS.map cf n - n'' | BS.null n' = "." - | BS.last n' == 0x2e {- '.' -} = n' - | otherwise = n' `mappend` "." - - -- case fold (c.f. RFC4343) - cf w | 0x61 <= w && w <= 0x7a = w - 0x20 - | otherwise = w - ----------------------------------------------------------------------------- - --- | Query @A@ record (see [RFC 1035, section 3.4.1](https://tools.ietf.org/html/rfc1035#section-3.4.1)). --- --- This query returns only exact matches (modulo 'foldCaseName'). --- E.g. in case of @CNAME@ responses even if the --- answer section would contain @A@ records for the hostnames pointed --- to by the @CNAME@. You can use 'query' if you need more control. --- --- >>> queryA (Name "www.google.com") --- [(TTL 72,IPv4 0xd83acde4)] --- -queryA :: Name -> IO [(TTL,IPv4)] -queryA n = do - res <- query classIN n' TypeA - pure [ (ttl,ip4) | MsgRR { rrData = RDataA ip4, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] - where - n' = caseFoldName n - --- | Query @AAAA@ records (see [RFC 3596](https://tools.ietf.org/html/rfc3596)). --- --- This query returns only exact matches (modulo 'foldCaseName'). --- E.g. in case of @CNAME@ responses even if the answer section would --- contain @A@ records for the hostnames pointed to by the --- @CNAME@. You can use 'query' if you need more control. --- --- >>> queryAAAA (Name "www.google.com") --- [(TTL 299,IPv6 0x2a0014504001081e 0x2004)] --- -queryAAAA :: Name -> IO [(TTL,IPv6)] -queryAAAA n = do - res <- query classIN n' TypeAAAA - pure [ (ttl,ip6) | MsgRR { rrData = RDataAAAA ip6, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] - where - n' = caseFoldName n - --- | Query @CNAME@ records (see [RFC 1035, section 3.3.1](https://tools.ietf.org/html/rfc1035#section-3.3.1)). --- --- >>> queryCNAME (Name "hackage.haskell.org") --- [(TTL 299,Name "j.global-ssl.fastly.net.")] --- -queryCNAME :: Name -> IO [(TTL,Name)] -queryCNAME n = do - res <- query classIN n' TypeAAAA - pure [ (ttl,cname) | MsgRR { rrData = RDataCNAME cname, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] - where - n' = caseFoldName n - --- | Query @TXT@ records (see [RFC 1035, section 3.3.14](https://tools.ietf.org/html/rfc1035#section-3.3.14)). --- --- >>> queryTXT (Name "_mirrors.hackage.haskell.org") --- [(TTL 299,["0.urlbase=http://hackage.fpcomplete.com/", --- "1.urlbase=http://objects-us-west-1.dream.io/hackage-mirror/"])] --- -queryTXT :: Name -> IO [(TTL,[CharStr])] -queryTXT n = do - res <- query classIN n' TypeTXT - pure [ (ttl,txts) | MsgRR { rrData = RDataTXT txts, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] - where - n' = caseFoldName n - --- | Query @SRV@ records (see [RFC 2782](https://tools.ietf.org/html/rfc2782)). --- --- >>> querySRV (Name "_imap._tcp.gmail.com") --- [(TTL 21599,SRV {srvPriority = 0, srvWeight = 0, srvPort = 0, srvTarget = Name "."})] --- -querySRV :: Name -> IO [(TTL,SRV Name)] -querySRV n = do - res <- query classIN n' TypeSRV - pure [ (ttl,srv) | MsgRR { rrData = RDataSRV srv, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] - where - n' = caseFoldName n diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src-test/Tests1.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src-test/Tests1.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/src-test/Tests1.hs 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/src-test/Tests1.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - -module Main where - -import Control.Applicative as A -import qualified Control.Exception as E -import Control.Monad -import qualified Data.ByteString as BS -import System.Directory (getDirectoryContents, removeFile) -import System.FilePath (dropExtension, takeExtension, (<.>), - ()) - -import qualified Test.Tasty as T -import qualified Test.Tasty.HUnit as T - -import qualified Network.DNS as DNS - -main :: IO () -main = do - msgfiles <- filter ((== ".bin") . takeExtension) <$> getDirectoryContents "testdata/msg" - - let tests1 = [ msgFileTest1 (dropExtension fn) | fn <- msgfiles ] - tests2 = [ msgFileTest2 (dropExtension fn) | fn <- msgfiles ] - - T.defaultMain (T.testGroup "" [ T.testGroup "decode" tests1 - , T.testGroup "enc/dec" tests2 - , T.testGroup "Type/TypeSym" - [ testTypeToFromSym1, testTypeToFromSym2 ] - , T.testGroup "mkQueryRaw" [ mkQueryRawText1 ] - ]) - -testTypeToFromSym1 :: T.TestTree -testTypeToFromSym1 = T.testCase "testTypeToFromSym1" $ do - forM_ [minBound..maxBound] $ \sym -> do - T.assertEqual "" (Just sym) (DNS.typeToSym . DNS.typeFromSym $ sym) - -testTypeToFromSym2 :: T.TestTree -testTypeToFromSym2 = T.testCase "testTypeToFromSym2" $ do - forM_ (map DNS.Type [minBound..maxBound]) $ \ty -> - case DNS.typeToSym ty of - Nothing -> pure () - Just sym -> T.assertEqual "" (DNS.typeFromSym sym) ty - -msgFileTest1 :: FilePath -> T.TestTree -msgFileTest1 fn = T.testCase fn $ do - bs <- BS.readFile ("testdata" "msg" fn <.> "bin") - msg1 <- assertJust "failed to decode message" $ DNS.decodeMessage bs - - -- load reference value - let refFn = "testdata" "msg" fn <.> "show" - writeFile (refFn ++ "~") (show (msg1 :: DNS.Msg DNS.Name)) - msg0 <- read <$> readFile refFn - - assertEqShow (pure ()) msg0 msg1 - removeFile (refFn ++ "~") - -msgFileTest2 :: FilePath -> T.TestTree -msgFileTest2 fn = T.testCase fn $ do - -- use this as reference message - bs <- BS.readFile ("testdata" "msg" fn <.> "bin") - msg0 <- assertJust "failed to decode stored message" $ DNS.decodeMessage bs - --- print msg0 - - -- encode it now again - let Just msg0bin = DNS.encodeMessage (msg0 :: DNS.Msg DNS.Labels) - - msg1 <- assertJust "failed to decode re-encoded message" $ DNS.decodeMessage msg0bin - - assertEqShow (pure ()) msg0 msg1 - -mkQueryRawText1 :: T.TestTree -mkQueryRawText1 = T.testCase "mkQueryRawText1" $ do - msgraw <- DNS.mkQueryRaw DNS.classIN (DNS.Name "www.google.com") (DNS.typeFromSym DNS.TypeA) - - let Just msg = DNS.decodeMessage msgraw - - assertEqShow (pure ()) (head (DNS.msgQD msg)) (DNS.MsgQuestion (DNS.Name "www.google.com.") (DNS.Type 1) (DNS.Class 1)) - -assertJust :: String -> Maybe a -> IO a -assertJust msg Nothing = E.throwIO (T.HUnitFailure msg) -assertJust _ (Just v) = A.pure v - -assertEqShow :: Show a => IO () -> a -> a -> T.Assertion -assertEqShow onFail ref cur - | show ref /= show cur = do - onFail - T.assertFailure ("expected: " ++ show ref ++ "\n but got: " ++ show cur) - | otherwise = A.pure () - - Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/01ca022e21220474ca6100f21d137b42.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/01ca022e21220474ca6100f21d137b42.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/01ca022e21220474ca6100f21d137b42.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/01ca022e21220474ca6100f21d137b42.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/01ca022e21220474ca6100f21d137b42.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/01ca022e21220474ca6100f21d137b42.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 50673, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 185, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 24290, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_mirrors.hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 3637, rrData = RDataHINFO "ANY obsoleted" "See draft-ietf-dnsop-refuse-any"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 44451, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 28) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/04e610d95902b1898ee6abce328905dd.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/04e610d95902b1898ee6abce328905dd.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/04e610d95902b1898ee6abce328905dd.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/04e610d95902b1898ee6abce328905dd.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/04e610d95902b1898ee6abce328905dd.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/04e610d95902b1898ee6abce328905dd.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 50214, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 147, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 0, mhNSCount = 4, mhARCount = 1}, msgQD = [MsgQuestion (Name "com.") (Type 50) (Class 1)], msgAN = [], msgNS = [MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 593, rrData = RDataSOA (Name "a.gtld-servers.net.") (Name "nstld.verisign-grs.com.") 1494230811 1800 900 604800 86400},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 593, rrData = RDataRRSIG 6 8 1 900 1494835611 1494226611 27302 (Name "com.") ",\SYN\230\r\ESC\180\139\246|W?\207\SYN\218\185\223:\166\129\218\251\243]\"Vm\241\156\227.\145P\219N[\250\138\"\220k)j\133\&8B%\232\249xo\221\187\248\ESC\vO\143\135\219\174\161\ETB\199i\248\184X\DC3VrU\205o8\237\rN J\163L$\203\200\211\148\&6\157\b\NULj\204\185E\238\186\ETXmZ\226\240\162\202>Y\226\247\186\128\RS\232\250\DC18\196RenvB\193\185\202R1-\a\182\229\156\158\bB\241\173I\162:\SYN\212\156Z\161\167\182]\DC1vB\169\SOH2\DC1\244\236\226k\DC1\153\198\165\201\f\195X\199\237\205\NAK\GS\203\208=\229\142o\159\189\252n\144\155\191\228\DLE\199\244H)e\135\239z\134\240\&3\ENQ7Q\243xs\149\&0\233Pl\164\216\NAK\196&\SO\180\219w\249\176\163\136l\176\180\235\157y\ETB"},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "i.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "d.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "h.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "m.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "c.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "b.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "g.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "a.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "f.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "l.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "k.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "e.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "j.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataRRSIG 2 8 0 518400 1495256400 1494129600 14796 (Name ".") "S/%\226\DC25\201D\151\140\161\243\248\192\a}\198\167!1\233\141h\205\203\ENQ\EM|8\204\184\224\b\203\223\r_'\187\US#\205YM\220\202?\240;z\136$\166\EOT\249M\251\146\&5\143\219\187\DLE\154\185Tx/\181\199\240s\184\135\171\247y\196\191\168E\216\159&\220\252\132\240\&0\a\217gI$\217\171\218}\ACK\144\DC3\199\t\tw\236\&7\151\SO\nQ\246\181aa_\251\156,\218[4\192\EOT(\165\NUL\163\233s\179$\tS\FS\147\176\228\179=\DC2pMP\186\155\FS\205njSC\159\187\142\b\215[\244\224\253z>\201\t\223\SI\t\165\153X\"\223\232\186sHg\DC2\196F\160\167E\144\ACKo\232[\132'\245\158Q\163\192\218i\175\214\157\ESC.\137mS\143W:\DC1\250\&8\251\DC3\226]\244\163\190uc\249\215\220\169V6\155H\DLE\216\180\NULh+v\150\255b2\168u\226u\175\177}T\206\163w\249]+h\EMRfx\US8\179\176\166l\186\190\199\229\155yB\184g\173\211\ACKA\208`g\136\216(\171~]P\159\203(q\159\234I\242\183j\153\&0\208>E\172\227r'yE\220\180Pl\184=\ESCI\243\155\SOHn\142\226\194\&9TI\192\r\192\FSu\129\143V\184\178\166\NAK\177\FSoI\239\179\GSs=\n]\237?\\?A\132\198\ACK\184\248\150\ETX\230\128\DC4+w\241\196\&5\160\246\131kG"},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 116905, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\168\NUL \169Uf\186B\232\134\187\128L\218\132\228~\245m\189z\236a&\NAKU,\236\144m!\SYN\208\239 p(\197\NAKT\DC4M\254\175\231\199\203\143\NUL]\209\130\&4\DC3:\192q\n\129\CAN,\225\253\DC4\173\"\131\188\131C_\157\242\246\&12Q\147\SUB\ETBm\240\218Q\229OB\230\EOT\134\r\251\&5\149\128%\SIU\156\197C\196\255\213\FS\190=\232\207\208g\EM#\DEL\159\196~\231)\218\ACK\131_\164R\232%\233\161\142\188.\203\207V4te,3\207V\169\ETX;\205\245\217s\DC2\ETB\151\236\128\137\EOT\ESCn\ETX\161\183-\ns[\152N\ETXhs\t3#$\242|-\186\133\233\219\NAK\232:\SOHC8.\151K\ACK!\193\142b^\206\201\aW}\158{\173\233RA\168\RS\187\232\169\SOH\212\211'n@\177\DC4\192\162\230\252\&8\209\156.j\171\STXdK(\DC3\245u\252!`\RS\r\238I\205\158\233jC\DLE>RMb\135="},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 116905, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\146\236\190\243\223\253`\216\DC3\194\252eC\162\\C}=(76\172\170\187\197\150)[\184,\139\207[\190\216\209mf\ACK\t\171\160Q\a\199\&0=\204\205\158u\ACK\216 Xc\231~\172\199w\227\213\188x\159\204\138\193\r2\212\198$^\248\DC4\221\162\150\DELH\231\155\202\179\229\DC3\213k\136\132R\ETX\249\162\SI\251\210k\128^j7\241\ESC\181\209\171\FS\221#m7c\165\SOH=S\138\250~S\130T\149P< +\226z\181\SI\131b\160\DELh-4Xn\168\196\241\252\129\235\DC3\144\221W\230\DEL\174a\198\168D\158\254i\218\SI1\221\SYNr\178\236\198\185\205\195\211zI\176g\206\130\156o\175\&5c\DC3\235\b\142\231\166\DC2\SOH\168\135_H\210\n9\164/\178sO|i\167\251\237\161b\202\214\184\171\239H\186\&5\187\DC4\227\203\SId\225\203~\FS3n\140'{\NUL,\158\r\DLE\168\195\156U\201\161\151\168\159\DC3p\191\190\&1"},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 116905, rrData = RDataRRSIG 48 8 0 172800 1495411200 1493596800 19036 (Name ".") "Z\249\197\192\196\231A\191\251\179\224k_;\158N!<\182\173;\ENQz~D\183\SOH\129!\213\203:9\161\149f\201+\rD\nO\216v\230\191\234\176P\142\166.\180Z~M\161\249X\245\227\233\188\EM\249\212\186\172;\197n\217\145\221~\165\180G\152\181\ACK\216\149\205sg\v\186>J4\177\195b\237r\NAK\241~\220,\239\134O.\158,\189\ETB\193\bK\131t6\SYNL\245\SYN\206\140:;\163\235;'\134\239\157 \225\138d\251x\fG\175%(\142\150\212]Q\202\229\254\&8Q_\SUB\NAK9\138\DC2PN\194Gf\132\180\162\154o\206\DC4\161+\137N1\197\162\238\148F\NUL\219|,\217S\179g\140\248[\234'\130u+\201\234\212\185\SYN\220bqf\a\193\DC4%\249\212\140'\242c\194\235u\RS\n\222\169\SUB\130S\141\142E/\248R\143\130\&3\222\222\200jVe'\npj\ETX@\SYN\150\DC3\135Q\222ca?\144\210"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/36187d17453931a5d1563c69ed34fb52.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/36187d17453931a5d1563c69ed34fb52.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/36187d17453931a5d1563c69ed34fb52.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/36187d17453931a5d1563c69ed34fb52.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/36187d17453931a5d1563c69ed34fb52.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/36187d17453931a5d1563c69ed34fb52.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 16363, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 14, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "br.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "a.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "b.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "c.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "d.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "e.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "f.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 5 1 172800 1494583200 1493978400 16335 (Name "br.") "C\r\136\233\&4\251z\214\ENQ\v\202fm\142\251`3\DEL\181\DLE\aj(/\242\STXO\243\208X\223\145\ETX\227-\146\153*Q\a\ESC\149^.:L\171\170\&7\227<7\221L\ETB\165\220y,\226\226WPF\RS\227\205\154\183\136\227\217\157\232b\177\189 \213@\b:\212\132\RS\240\236\187\240tca\153K/\193\225\132\ETB\166\NAK[VQ\253\175\166K\153\218\213\SUB%\249#\231\143\134\DC1\169\189!}5\CAN0\EOT\179\144q]V\201\178\STX\202\190\151f\163Ks\NUL\DLE\188\140=\SO\178\218\180\194\174\210m\222\223.\252'"},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataNSEC (Name "0800.br.") (fromList [Type 2,Type 6,Type 46,Type 47,Type 48])},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataRRSIG 47 5 1 900 1494583200 1493978400 16335 (Name "br.") "\154\183\204(\130\144\188O\252\209\225\ENQ\SO\252CET@Ve\203\253\139\140\199\243\206\238m+\223\185f\DLE\152$\ETB\159sW\246#\"\CAN\223`\196.\200\181\212\252|\199\ACKN\201\197+\ETB;-\179*.\US\140\f\164g<\r\163\247\173|\157@s\247I\170\ESC'\203f\US\201\204\&3\204S\169\164 \233\203\&8Gw\254\EOT\202\217\SUB\US\180\237\174]Ok\251\246\234\SUB1\242\167i\247\168\150\EOT\249\200\ETB\234\SOH\234\DELm\197\156\194O\223C\245\236\198\160\242]\NAKV\181\180\n\207\128\217@U\EM\180\132\220m\153"},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 21599, rrData = RDataDNSKEY 257 3 5 "\ETX\SOH\NUL\SOH\194\&8\150i\159U\208o\243\225G\214^\132fc\232\144h\"\135\188\SUB\SO\245\254\161\136\240\&4\146@\250\236\188\219\178\138\r\168\151\EOT\141\228\SUB'P\221\EM\SUB>6\NAK_P&\145\202zs\191'\238_f\252\240\230\165\201\SO%%{_o\249\SYNf\SIk\228s\234\DC4\229\223\234\144\r)V\152 =3\148\217~\192+K\243\163\ETX\151\141\160\137\151b_\218\156\209$\161\227\231\216\235\215\235\160r\199\223\159\223:\232\201\191\SIH\t\174\151\153\162UK\253x\247\195'\SO\240Ix\243\131\DEL_ws\DC3\188E\243`\252\170\242l\SYN\202\bz\194\RSI}U\\\205\178\166\136J\237}\249i\174\135\169\DC2\248Lg"},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 21599, rrData = RDataDNSKEY 256 3 5 "\ETX\SOH\NUL\SOH\209Zg\144K\201\185\174\150\154}\225\223\n\244\180\239\151\195\167\150\173\217\a#i(\189\166\192\"\175J\222\128\227\251U\217\235@t;@T\180\184\196\152\160b\NUL\217\231\245=\aX\b\ETB}{\228a\138@9\137\170\183\184\SO^\222Sh?\236\ENQ\130\151we\ESC\214:y\195\236%\254\139\194b\221!\161}\132!\190X]\217S\228\239:*\RSp\144\ENQ\202\228)\247\GS\169$\v5\254Na\192\131\135\197\242\ESChd\193\151`\162\EOT\235\252\195\130\179$\195\131\175\184H\SI\162^\156\248Z\162\194\143\143\246X \170\149\141\v@\184Z\b\DC1\SO\131\199\239>\166\166\&3y\235\&2\237\208m)\254\182(\140\&3z\144Ws\US\137\217\153Ujc\249\162'\138O\n$\230\179\&2\179\221u\140\r,G\209(\250\&8\137^0\210\174\224\154b09\188Hw\214m\173@#\226\SI\240\224\186\241\255(\176\DC1#\176l\f\231gBq\224l\SIXv\133\n\204\155\130S\212m \213u\196\200Z\235R}\244\216\&3l~^\136\189\174\DEL+\237.@\250\205\202\238-\184\206\222\&5v\186\SUB:\165%\DC3\NUL+\207t\189\CAN\200\n\140\172G\180\183\&6\200mc7M^\223GI\170\137\252\135\205Z\191\169\&8\b8P\216\130J\228 \EOT\187@\252\205\177\194Z\ETB\RS\190\165\218\158c\176\135\SUB:\198"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 39631, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x17603435)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x17647aaf)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x682bc3fb)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x6828d323)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0xbfefd5c5)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 60637, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3580, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 3480, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 633, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 733, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154963 1000 1000 1000 1800}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 39296, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3428, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 21306, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 6) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2915, rrData = RDataSOA (Name "ns1.msft.net.") (Name "msnhst.microsoft.com.") 2017050703 7200 600 2419200 3600}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/4e86d529a6401b74f84956cd72682c15.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/4e86d529a6401b74f84956cd72682c15.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/4e86d529a6401b74f84956cd72682c15.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/4e86d529a6401b74f84956cd72682c15.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/4e86d529a6401b74f84956cd72682c15.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/4e86d529a6401b74f84956cd72682c15.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 31, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "torproject.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataNSEC3PARAM 1 0 16 "\185\181\DC2\245\247"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataRRSIG 51 8 2 0 1497380687 1493921581 59061 (Name "torproject.org.") "\ESC\139\217>\186\USz(\219\227J\162\235\215t\166\171\198\136\243\146\202;\128\130<\152\232\SOH\167>\248Q \177\130'\NUL\231\199\199\222\172\fE\206g$sR'\205=\216\188\211\152\230\232\202mV\220\164\128xsj\129\138\173\ESC\217\SYN`\NUL\231RE{by\173\177\235\ACK\203IT\128\167\212\197J\174\205V\145\n\133\NUL\175 \187\200\232\b\200*/-\141R>|W\153\176 \242\201\160\SIK\SUB\146\160\227\242\146\181\STX%\129\195\b\209\210N\FS\GS\255\174e\FS\227!}\179g\211\148\188\159b),\149ym7\fi\155\163A\181T\169\154\196/\141\212\170\224\198\253q#F\DLE\ETX\141\217\216\133,0\163\183\207"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataSOA (Name "nevii.torproject.org.") (Name "hostmaster.torproject.org.") 2017050738 10800 3600 1814400 3601},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 28 8 2 300 1497627735 1494168135 59061 (Name "torproject.org.") "csn\208v\207*\137\134\225U\CAN\187\253\212\&2\176\223\250;\205`\DC2\b\\\a&\246\188\203\133\215q@U\DEL\247\170z\r\GS\172\193\243\177\CAN\183(\196J\253\192\240<\255\199\226]\252U\242\EMdJ\156\171p\245A\189\EOT\250]\253\220,\138\224-V\209\171R\158U\132B{\159cl\202#\ACK2\216\249+\213npY\EOT\133\129GFl\249b\GS\154\189\243+)\230\132\170\240'Q\167\&2r\210\SOH\DEL\196S\163\145\&9\136\208\181\NUL]\ACK\GS\142\140\164\241\253\134j\135\DEL\135\&0\159\145\US\ESC>\163\208\\\",\236\217h|\245\&1\DC4\179,\189\211\174bo\DEL?\\\235[\SI\229\176\DC3\244\190b\224/\129\ENQ\245"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2620000006b0000b 0x1a1a000026e54810)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2001085800020002 0xaabb0000563b1e28)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200141b802020deb 0x21321fffe201426)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2a0104f801721b46 0xabba00050001)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200106b0005a5000 0x5)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 15 8 2 3600 1497532518 1494075620 59061 (Name "torproject.org.") "=KT\176\SYN\SYN\226\&6\213k\171{\174\213{\209\NUL\171\250\&9D\168\t\177\202v\249\143\&1\211~:8\220\214g!\134\167\250\175\136\&5J/\205\205&\231\DC4\161\252\144~\160\245\250\210\213\253\139\205\199\215\234P\248\b-\179\157%\138Y/R\201\171\189e\241\203\181rHQ\CANsB\248$\217\202\144a\237\&1U4\EOTe:W\201\SYNrU\\\EOTy\207\224\214\244+\255U}e\169\&4\243\SUB\192\CAN#.CY\DC2$\133np\170N\219\242\245\&2\163\154\134\232R\v(\171\ETB\242=\225V\196g\228\147\231\STX]\US\238m\175ok\238\160\CAN\172{w\ACK\"\173\ACK\240P\208;H\195Hf@u\228\&0l(\165\131"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 1 8 2 300 1497627735 1494168135 59061 (Name "torproject.org.") "C%\201\209\ai\SUB\SYN\150_\EOT\209@/\183\150\229s\156\&8\250\177\174\245!\154\USH\132\188\DC3\138]\167}l\182\&8=\166\233\DEL\153T\169\159O9\195\177\"T\130\146\223s\ACKkp\224\172\DC2\\\182\224\ESC\STX\DC1\202\224\243_u\204\246\159\146t=`\ENQ\UST\157)5-3\212=\151\250U\180J\EM\202\DC2\200\169a+\196T\226\228x2\NUL\208\141\189\178#\b\US\189\ACKU{\245\tq7\216\158\159\237;6\196l\193\146\178\178\&8\161\154e\166\210\150\183c]!\DEL\211>\US&\EOT\208\253Q\161x\FS\251\186\141T7\171%=\207c\ETX\t#H\208\157t\252\194$(rI\146\223\189<\SUB\211\161\&5\253D"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 86400 1497572963 1494115902 59061 (Name "torproject.org.") "$_\241\250\&5\246[\189\226iR\196\138PqqH\214\176@!\155\244V\195\224G\209n\234z\SYN.\151\SYN\187\194\151\167!#x\222\&4\163\169\170\232Ac\181Z\142\233\166\CAN\246\EOT\t\132\218\&0\213\140AK\220\162\237\248\144l\161z\RS\128\254\213\176\223\US\231\139\203\215\"\145\214$\192l\153F +[\175\201\"\136\189\r%\177\169\194\242\145\158\233\EM\202\NUL4w\238\168\SOH\a\DC15\n\160\221\DC2\rj'+\194\130c\ENQ\198k\249{/p]\181\159\202h\167\151\162dH\SOmt\242\176J\134\229\163d\203\222\214*\245\252cYqa\242Q\GS\192:\167\EM.\200E\171@\NAK2P\SUB0l\247=-(\f"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 6 8 2 3600 1497692652 1494233052 59061 (Name "torproject.org.") "'^\229\253\SO\135\241\160\t\195\229W\129\150\201\130\251q@\213\217\&3.;\243\218!\192\183<\217~q\ENQ+\ENQ\DC2M\230\135}\183\197\168#\143\&5\201\213_\SUBx\196\\{\218\"\234(\216\133\211\209\213N\237\USRURz\128P\NAK\253y\175\207\DC3\230m\202\164\222\&9\167\128\220\ESC\184\206dB\SI\152\189\133q#Ua\234\175\200G\FS\224\189'Kk\143\229u\136vX\SYNY\242n.~t\188\132\254|\244\150k4\217\180\181\b\167\DC2\181\174\150\139)Jo\145-\180\141$\225\DC1\245\a\154\GS\201Fb\213\150q\v\v\140\&608\158\216\144Yj\184\151\237?\192\190\EOT\162?,\249\STXb\166\187\254\199w\212"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1497462010 1494002410 17224 (Name "torproject.org.") "\143\&8*?\209\140\SI\160f\254h\203\v\219\226B\153\148U\SI\159\182\233\158\ETX\149\134\142\US\233`\\\138L\DLE\135txpz\148\198y\230\237\230h\228\&0W\179\n\186\ETB\194\146\DEL\r/\190\138t\188\&1\202\164\EM\RS\163\183\184\EM\DC1\CAN1\204\207 \rk\129\200^+z\" \134\SO\RSX\249\DC4\130\206\204,\158\158\130\159\176\&8\248p;}-M\139\r\133\152\&1\217\203\r\246\ACK\234\ETXd\246\247\135O\252\153\229(\250d9\159T\184u\202Q\195\SOH\146\176;\137OM\219\DEL\DEL\178\249\STX\b*{\186e\203\157\150\&1\194x\147#9\161\232\143\172\250\168\172\ENQZ\194\233S\EMr7\234\220\142\233\205x\132T\v \183a\158\225\214(\240\234\143h\217\230\DEL\229YX\213 \211\228\146\&2\ESC\187\229`\132\187k\231a\EM\193\129\DLEW\246Wm\231\197#\ESC\NAK\158p()\a\\V\164\152\164\252\158\&6\168\200\140\&8e\147c"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1497462010 1494002410 35740 (Name "torproject.org.") "bZI\194E(T\n\244~\160@\SYN\DC4L\164\167\251|\251\n\254\162\184\139\NULe\247\159\DEL\NUL[\180\152?\153\148\DC2\203\138\253\155\189\248\139\178b\192\149u \NAK\235\204\194\NUL\203\205|/7\130\&9\147>\139{1L\182/[\165\205R\233A\175=s\157\242,\230:\211\210\163\187v\DEL\160u\205\136\253\176\252\b\156\ENQ\158;\239\153sTw_7j\227w\129\194tA\161\DC2\227\182#\DEL\174\212\251\148\151\205\201,\167\SO\243\132\198\138]\161|\129\199\&9\160\151'\243\&7\226\150/\238\192v\159\129.\209\170RNV\233\238\212\254\255\158\v\251\137\206\175\180\214K\253L\144V)\179>m$\131\147\241|\242w[z\246cVV\216p\142e@)\232\253\146i\200\220\196\234[\230\203C\b\234\141\139\157:z\a\202\141\166a\ta\DC2g\188\239\196\194\186\220A\202\246K?M\217w\158\199\208d\216$\188\215\136t\175"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1497462010 1494002410 59061 (Name "torproject.org.") "D&\210'\154\164~\193;m\223\216\174\203\&0[\159\208\220\236\232\206u\DC3\ETXn\214l@\195\223g\252Z\254\147T\DELWc\246\129\185\141\v\133\147_\DC4\NAK\173\231[\195\216h\225\159F=\SO\188\230\&0\254\DC4+_E\155\174%A\ETX\229j\vuKz\ENQ\150\240\bV['\237u}P\255\155@\154\149\247\189\251\EOT\DLE\t\174\254\142$x\RS\245~p\248\139\172\240\254\249b\184\SYN$\228\DC4\ACK\168_\189-S\202\136\210\213\198\DC3y\169\144\SI\149\250\v,vW)C\187S+\147\183\SUB<\167c\SUB\188\CAN#\144\195\FS\182}\185\139N\199\251`2\139\140\255|V\238\158r\ESC\CAN\215\STXZ1\170\188R\f\228\221"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\180\DC4Zp{K?\191H\186\210^\193\197\EOTV\232\145\161\187\238\v!\209\240\NAK\192\191}>3\214\246\145o\152\142%\134\208CZR\US\157\147=\DEL\128\238\NAKH\138jA\222\155M\164\153\225a\172F\135\189F\135'g-N\197*\131\171\b>P\128\138b{\r\157u\230[rpa7\ESC\194\162-\255;>\170X\231\150\177\&3w\255\173\226X\143:\196\241z\131\CAN\146(\US|_\154)*\b\152\184\ENQ\182\159\STX\CAN\178\183\238!\248\b\172\EOT/\166\144\151\DC1U\140\&7W\NUL\200\246\a\STX\174\225\175\249\130\149\SO^\250o\"\173\250\143\178S\220c\178\197;\EOTz\149\SUBi\181\211\254\209\142md\209\135\201;"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\208\227\159\216\218\187\227H\b\208\244\f\139\EOT\159\210vW\RS\163:\SUB\180\179Y\255\178\156|0\160r\187\b\197\251\183\201\147xh\227\&9\202\194\209{\211xv\241\134Q\201EQ\151[\140,a\251<\DLE\211\230\196\&9s2\226\253\225\226\&2\173,09\192\217\bx\247>R\CAN\224] 6E$k3&\159P\205\163\248v\153\ETXi{\129,nhf\144LF\212\NUL\SUBkt~?\184\190\207v\228\165D\196\163\&3@\198\249![\224\148]\182Pv\212\165\238p\162\165\212\175a\167\206\152\138\130\130\176\167/>\164D\194,-\t\255\ETB\201\&3\143\230\DC4}\255\236\226\"E\224\138\150\168\SO\SOH\221\163\156c\EM&\148\&8\135\&7\v~\211\&1\ENQ\252_\234r\137{\184\239\174\233\&2\206\DC2\NAK5\RS\174\242\213K=T\194).\196\158\165\&0i\136Dh&\231\&0\SOH2\SYN\130\ACK\243\&5\131\198L\234}\188\242\&2\174\248\130\151"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\201eI\ACKo\150\NUL\219\&5d\"\\\t\226_\210\DC3#%\169r\169S\ESC\132\EOT\181\SI\EOT\DC3#\t^\220\178jNrh\DC3\SYN\162o\ESC\236\162\181\196\232\165\169\209\243\"\v\NULx4\ru\175a%\169\&5\165\SUBC\177\&1\SUB[\DELn\SO\230/\137\&8\136\205U\195&\245vC.V4`\180J~,c\198\233\245\186\184.\146\151pt\198IYI\198,\248\252OO8\172;*\190v$\181\195\128\147\DC4\n\140\DLE\RS5\159\139\136\253\&1}S\254\SYN\218pI\225~8\234@\144%\131\191;u\133S&\154\130\221\220\213G}@\153\141\218,\161\190\t\172Y\v\211\218\245\&6#9e}\188\ENQ\164\134n\130\222\191\239\190\200\202\132\241\157\211\FS\227\147\DC2\198\156kE\SI\247\133\170\145\206\210v\148\EM\148%\200\229\192\220^\222Ye}\194*\237(\149-\171q\242\157\SUB\170\249\213\199\153\RS\v\137\222\191\183\180\209\167\183"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns5.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns1.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns3.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns4.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns2.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x9a238446)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x8ac90ec5)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x26e54810)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x592deb15)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x563b1e28)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x52c34b65)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataMX 10 (Name "eugeni.torproject.org.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/53d71a9e72adf19251123b46f31769bb.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/53d71a9e72adf19251123b46f31769bb.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/53d71a9e72adf19251123b46f31769bb.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/53d71a9e72adf19251123b46f31769bb.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/53d71a9e72adf19251123b46f31769bb.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/53d71a9e72adf19251123b46f31769bb.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 38143, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataPTR (Name "ghc.haskell.org.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/54f81230e47e2399d16a309e1227025e.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/54f81230e47e2399d16a309e1227025e.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/54f81230e47e2399d16a309e1227025e.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/54f81230e47e2399d16a309e1227025e.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/54f81230e47e2399d16a309e1227025e.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/54f81230e47e2399d16a309e1227025e.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 53536, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2306, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/552aec026306990d49a098d0a4608434.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/552aec026306990d49a098d0a4608434.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/552aec026306990d49a098d0a4608434.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/552aec026306990d49a098d0a4608434.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/552aec026306990d49a098d0a4608434.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/552aec026306990d49a098d0a4608434.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 2, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "4.4.2.2.3.3.5.6.8.1.4.4.e164.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.2.2.3.3.5.6.8.1.4.4.e164.arpa.", rrClass = Class 1, rrTTL = TTL 86046, rrData = RDataNAPTR 100 20 "u" "E2U+pstn:tel" "!^(.*)$!tel:\\1!" (Name ".")},MsgRR {rrName = Name "4.4.2.2.3.3.5.6.8.1.4.4.e164.arpa.", rrClass = Class 1, rrTTL = TTL 86046, rrData = RDataNAPTR 100 10 "u" "E2U+sip" "!^\\+441865332(.*)$!sip:\\1@nominet.org.uk!" (Name ".")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 45729, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3542, rrData = RDataMX 10 (Name "microsoft-com.mail.protection.outlook.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/579ff887c8ea54e4173934be5e85faec.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/579ff887c8ea54e4173934be5e85faec.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/579ff887c8ea54e4173934be5e85faec.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/579ff887c8ea54e4173934be5e85faec.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/579ff887c8ea54e4173934be5e85faec.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/579ff887c8ea54e4173934be5e85faec.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 33589, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"]}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/585424227713068d541ca07b184abd89.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/585424227713068d541ca07b184abd89.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/585424227713068d541ca07b184abd89.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/585424227713068d541ca07b184abd89.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/585424227713068d541ca07b184abd89.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/585424227713068d541ca07b184abd89.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 32, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "eff.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataSOA (Name "ns1.eff.org.") (Name "hostmaster.eff.org.") 2017042405 600 1800 604800 1800},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNS (Name "ns6.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNS (Name "ns1.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNS (Name "ns2.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataTXT ["v=spf1 mx ip4:173.239.79.202 include:spf1.eff.org include:spf2.eff.org -all"]},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 10 (Name "dummy1.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 15 (Name "dummy2.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 5 (Name "mail2.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataA (IPv4 0x4532e836)},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 220 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 230 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 240 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 250 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 260 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 270 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 280 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 290 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 300 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 310 10 "" " !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 320 10 "" " !!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 100 10 "" " !!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 110 10 "" " !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 120 10 "" " !!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 130 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 140 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 150 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 160 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 170 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 180 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 190 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 200 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 210 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/593b5d26fc010f953c99621a7d608c8d.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/593b5d26fc010f953c99621a7d608c8d.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 19974, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2950, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 20003, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 999, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494155229 1000 1000 1000 1800}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 64444, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 2, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.google.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xd83ac9e4)},MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2a00145040070816 0x2004)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/60c1e26a578cd3007a592250dbad30be.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/60c1e26a578cd3007a592250dbad30be.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/60c1e26a578cd3007a592250dbad30be.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/60c1e26a578cd3007a592250dbad30be.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/60c1e26a578cd3007a592250dbad30be.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/60c1e26a578cd3007a592250dbad30be.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 61653, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 148, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x97650044)},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x97654044)},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x97658044)},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x9765c044)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 2963, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 6) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 26891, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2846, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 16652, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 999, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494155077 1000 1000 1000 1800}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/62ce31cf45d2d095d384da330a6e6189.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/62ce31cf45d2d095d384da330a6e6189.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 32245, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 10072, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "_mirrors.hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataTXT ["0.urlbase=http://hackage.fpcomplete.com/","1.urlbase=http://objects-us-west-1.dream.io/hackage-mirror/"]}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6a0b07a53da450663489f3ff62fc7866.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6a0b07a53da450663489f3ff62fc7866.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "fencepost.gnu.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "fencepost.gnu.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2001483001340003 0xe)},MsgRR {rrName = Name "fencepost.gnu.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xd076eb0a)},MsgRR {rrName = Name "fencepost.gnu.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataSSHFP 1 1 "\ETB8\CAN\146I?\149\218`\185\b[f\189\CAN\185\142\190\252#"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 23209, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2381, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 16755, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 590, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154820 1000 1000 1000 1800}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 3198, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="]}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 1192, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3478, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 51432, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "_xmpp-server._tcp.gmail.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt3.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt4.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 5, srvWeight = 0, srvPort = 5269, srvTarget = Name "xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt2.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt1.xmpp-server.l.google.com."})}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 24972, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "4.4.8.8.in-addr.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.8.8.in-addr.arpa.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataPTR (Name "google-public-dns-b.google.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7e3570aada9975cbb2285ed217fe5016.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7e3570aada9975cbb2285ed217fe5016.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 7, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "example.com.") (Type 43) (Class 1)], msgAN = [MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31589 8 1 "4\144\166\128mG\241z4\194\158,\232\SO\138\153\159\251\228\190"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31589 8 2 "\205\224\215B\214\153\138\165T\169-\137\SI\129\132\198\152\207\172\138&\250Y\135Z\153\f\ETX\229v4<"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 43547 8 1 "\182\"Z\178\204a>\r\202yb\189\194\&4.\164\241\181`\131"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 43547 8 2 "aZd#5C\246oD\214\137\&3b[\ETBI|\137\167\SO\133\142\215j!E\153~\223\150\169\CAN"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31406 8 1 "\CAN\153h\129\RSn\186\134-\214\194\t\247V#\216\217\237\145B"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31406 8 2 "\247\140\243\&4Or\DC3r5\t\142\203\189\b\148|,\144\SOH\199\246\160\133\161\DELQ\139]\143k\145m"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataRRSIG 43 8 2 86400 1494563200 1493954200 27302 (Name "com.") "\133-dQ\179\DC3\EMi\SI\166\249\140E\212\163\219\181k\SI\197\198M\231\EOTJ\203YO\189Z\151\170p\232U$\160\DC2A6\234c\233\DLE\183\150\200\SOH\177\164\DC2c\161\223\201AB\ENQr\241*\a\251]\tWQ\219\128vPs\145g@\153=\140\141\139\176\222\238:d\145\184\SYN`\ACK\156Z\SIavT@\ENQ\140\179D\200@ s\190\239r\237\160\213\225\FS\215\129\EM\252\ETX\135\ENQ]\225*\CAN\USg\240\242"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 65505, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 1318, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/816c6c332941a20f07c497ee16609971.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/816c6c332941a20f07c497ee16609971.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/816c6c332941a20f07c497ee16609971.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/816c6c332941a20f07c497ee16609971.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/816c6c332941a20f07c497ee16609971.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/816c6c332941a20f07c497ee16609971.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 10909, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x6828d323)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0xbfefd5c5)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x17603435)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x17647aaf)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x682bc3fb)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31016, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "4.4.8.8.in-addr.arpa.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.8.8.in-addr.arpa.", rrClass = Class 1, rrTTL = TTL 86133, rrData = RDataPTR (Name "google-public-dns-b.google.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 0, mhNSCount = 4, mhARCount = 1}, msgQD = [MsgQuestion (Name "debian.org.") (Type 50) (Class 1)], msgAN = [], msgNS = [MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataSOA (Name "denis.debian.org.") (Name "hostmaster.debian.org.") 2017050804 1800 600 1814400 600},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataRRSIG 6 8 2 3600 1497698216 1494238616 53598 (Name "debian.org.") "\141G\148\&8Ru\215~\167\220\201\a\234\142\f\136?p\174d\136E\130\135\136\&7vA\212\"x \188\189\SYN\166x\158y\236\DC18\163\241\217B\169;\200IUF\136\138\253A2Fq\150M:\174C/Y\GS\194XD\135\216\140P\DC1U\187\STX\163DM\182\205\243\185\170\165C\209,bp\195\246\236\162)\180\209\ETX\216\232\219\241<\219\158S\EOT+$C\250\174\b\237\155:\233\177@\208F\192\198\131\132zsO9@\f\247\138\SOHjM>ajU\179\t\n\222\203b\DLE\253\224\&4\240\DC4N\146ua\148\208\185\183:}\156\148\153\171\ve\180\SI\229\193\140\232\SOH\182<#?P\STX\164#3\167.\163\143\&9\205"},MsgRR {rrName = Name "r0ju544ltcbavo1k3br87djp168tl58j.debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNSEC3 1 0 16 "\SO\192\162\220\222" "\216>\235R\171\NAK\DC2a\203\134\DC37\173/E\197I$\182v" (fromList [Type 1,Type 2,Type 6,Type 15,Type 28,Type 35,Type 46,Type 48,Type 51,Type 65534])},MsgRR {rrName = Name "r0ju544ltcbavo1k3br87djp168tl58j.debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataRRSIG 50 8 3 600 1497614849 1494156550 53598 (Name "debian.org.") "\234\DLE\144\162h\RSm\188|\SOHB\233\215\RSJ0\DLEoD \218\178\131|\251\205\&3\246WZ\227\208\v\EMD\251\153t\193\155\145\133w7\EM+\133\244\129\159\SUBgT\DLE~{\229\218\187\&7<\173D\169\204\169f*\v\189\149_\161\210\207\173\169\166\DC3\168\DLE\n\141F\221\138f\131\214'\194\131\ACKc\r,e\180\bON\235'\132\r\198\160\242\v*\ETX\ETB\140x<\135\165\219\ETXk\NUL\221\&0\216/};\223\241\US\"*@\230\135`\216\222\207\234\217dfI;\238g5u+\DC1e\155\SO\195\239\229\196("},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC (Name "_openpgpkey.fedoraproject.org.") (fromList [Type 16,Type 46,Type 47,Type 256])},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 47 5 3 86400 1496578736 1493986736 7725 (Name "fedoraproject.org.") "\144\141\152~q\a\220}#\DC2\228\150\140\166\209\152B\202\r\SO\184\ENQ\176\202\SOH\167\ETB==\\WN\ETB\193\242\159v\141\218\158\232\DC3O3x\130=\188P0\SI(\140\129R)\223fd\183qB\187_\GS\165\128wGR\228p\204\&7\DC3\173\186\130\221l\135\STX\STX\147\DLEV\243\159\&9\STX\138\209\DC4=\DLE\DC4\"/X\232Y\190\134\198\216k-\160q:p\206\189\176~ \154\242\226\&9m\232Z\214\129 \228_"},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataURI 10 1 "krb5srv:m:kkdcp:https://id.fedoraproject.org/KdcProxy/"},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 256 5 3 300 1496578736 1493986736 7725 (Name "fedoraproject.org.") "\ESCg\174[\230\138Y_\218\200\&2\SUB^\ETX\243\128\&6\180\131\136\245\181\158'\224%\204n~%\CANN=n2L\146\203h\198\153\SYN\175\221\243\EOT\171}\137\136\181\SO\191\226b\152\SI\222k{\132R\143\220U@\250\220~\235\154\159\186E\211&\187\174Jjjs\196H:%\248\EOT\235\194\182\139q\181\158\187\131\164bE\f:\210^f\NAK\147\ETXF\RS\203\&4\174\188\164\153\198\v\142kJ\188\136\173~\150\128_"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 16846, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 185, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/9499a890bd65e85e74e68ca5631941f7.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/9499a890bd65e85e74e68ca5631941f7.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 48779, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "_xmpp-server._tcp.gmail.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt3.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt1.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 5, srvWeight = 0, srvPort = 5269, srvTarget = Name "xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt2.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt4.xmpp-server.l.google.com."})}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 3}, mhQDCount = 1, mhANCount = 0, mhNSCount = 8, mhARCount = 1}, msgQD = [MsgQuestion (Name "xfoo.org.") (Type 255) (Class 1)], msgAN = [], msgNS = [MsgRR {rrName = Name "dlbdq9qmbnmmf3v28ndnjkv55oc2f0ad.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC3 1 1 1 "\211\153\234\171" "mW\246\229v\\-\n\185\148\151&\141\DEL\a\191\200\217%\231" (fromList [Type 2,Type 43,Type 46])},MsgRR {rrName = Name "dlbdq9qmbnmmf3v28ndnjkv55oc2f0ad.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 50 7 2 86400 1496158069 1494340069 3947 (Name "org.") "v\DLEJ\225\185\241\204\204jl\208\SYN\221(%\168G:eLV\241E\195$\239\CAN\223\164\195\CAN\246E|\179M\168G\159\&2RAR'\136\150\171\NUL\238%\ACK\EM\196\143\r\250\222N\244x\244\&1\255=g|dB/\239Y\b\205\255n\156\179&\140\ETBfG\232\207\172\f\ETB\251GK\201\DC4\180\242\209\172\149\218\210\222\145\161^yi\144\246\&2A\141\239\140\214(\190\EOT\251\165\211ySH\EOT8\232\ETX\DC2\222"},MsgRR {rrName = Name "h9p7u7tr2u91d0v0ljs9l1gidnp90u3h.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC3 1 1 1 "\211\153\234\171" "\138r\173\236\198OM\228`0\228\DC2\224\214\210\237\b\215X\GS" (fromList [Type 2,Type 6,Type 46,Type 48,Type 51])},MsgRR {rrName = Name "h9p7u7tr2u91d0v0ljs9l1gidnp90u3h.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 50 7 2 86400 1496166683 1494348683 3947 (Name "org.") "\162,\189o\CAN@\248\170$\DEL\DC4|\128\134\232\SYN\246\230rE\153{A\173x\241#8|\231N\166\163{b\145[uB\f\148,\148(\242E_\192\225L\193\186*\232\154\US\173\174\133^\SUB[\139\208+B\CANOc=\144R\NAK\228\ACKc\237\171\159\181\b\SOH$;\138\216o\ETBq*\225\251\225\133WJlX\SOH=K\ETX\198\182\149\255\133\NAK\186R\213&\206\211\244\150\US\DC3'\f\186]\ETB\242BE\DLE\DC3"},MsgRR {rrName = Name "vaittv1g2ies9s3920soaumh73klnhs5.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC3 1 1 1 "\211\153\234\171" "\250\166\180%\ru\DEL\210\250d\146Z\NAK\237\162~\250\190\&2\193" (fromList [Type 2,Type 43,Type 46])},MsgRR {rrName = Name "vaittv1g2ies9s3920soaumh73klnhs5.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 50 7 2 86400 1496158069 1494340069 3947 (Name "org.") "gO\136U\GSsg\199\162 \243\158\STX\190~\131\ETX\228=.\211x\191\SUB\194_\241\FS\158 \167\202\170\221\141\148\220\165\159\170\253\209\182\195\\\218N\132\&6\254\EM\158\200\251\\t\146\244\&1\254\241\DC41E\248\143)\227Hm\CAN,\EM\255\207~e|\163\200Eh\227q\ESC]}\169\188\229\139\245\166\206\221\254\145%\150\136\190T@\DC4:\SOH\249\177\148\189)le%_V\186u'\214\254C\245\NAK\212]l\237"},MsgRR {rrName = Name "org.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSOA (Name "a0.org.afilias-nst.info.") (Name "noc.afilias-nst.info.") 2012479177 1800 900 604800 86400},MsgRR {rrName = Name "org.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataRRSIG 6 7 1 900 1496166683 1494348683 3947 (Name "org.") "\DC1U\179b4\204\v\240\182\f-\170\206\195\144O2p\DC3\174\160\251\177\r\185\RS\199\RS\239\221/@\b\136\235\201[B\n\236P\SUBb\198>W\163~\221^\233\ETBr\\c\212\238\185\136w\USUG\128\201\161\&8\128WU\SUBS~~!\208\160\206\191H{u\158\192mP\253GE\128\155\nY\207\SOH_\DEL\163\208\195\139\US \225\253\182\237\231\244J\135-\ETB\204\130\187\217\209\162\161t\212\220\b\\l\ACK\NAK"}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/98b101299888feb502f38066db59f0af.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/98b101299888feb502f38066db59f0af.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/98b101299888feb502f38066db59f0af.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/98b101299888feb502f38066db59f0af.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/98b101299888feb502f38066db59f0af.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/98b101299888feb502f38066db59f0af.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 18, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "openssl.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataSOA (Name "auth.openssl.org.") (Name "hostmaster.openssl.org.") 2017032573 86400 900 604800 3600},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNS (Name "secondary.lp.se.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNS (Name "primary.lp.se.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNS (Name "ns.openssl.org.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataA (IPv4 0xc26196ea)},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataAAAA (IPv6 0x200106080c000180 0x100ea)},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataMX 50 (Name "mta.openssl.org.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\162l\158\239\255\&3\RS\144\175\162\&3}\143|\138\214Nk\NUL\200\217\214#*\171\176SW\ETX_-\200\235B\152\232\DC3\191\182\ACK\240\160\198R\188\156D\147\163L2\199\170\245\142\187\195\169\178\135\159\203\242o\177\196\230\129\234\206\171]\151\192S\225ufi\ACKKy>~D\134\192]\150}\168x\181O\250\214\ENQ8H\143\222.\221X\169_)\202\239\180\226}\200\189\252\v*\r/\210RP\145\184mk\197{"},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\188i\181\221\168\175\172\SOH\f>\207\ACK\209\158\184f\DC4\200\139e\164m\149\SO\140\240\198s\161\SYN#\ESC\151Vkd\145\193~\239\254\226\199\252\&9*\130M\DC1\157\148\132\169'\187\153\185R\139\186~\SYNg\153\239\128|\249\140\v+\194\a\r\220\128\150\&1\225\168_%\144\131\ETB>\DC3d\254\249M;\ESC\178\168\ETB7\216\193\198\173\165wT\EM\182and.\222\195\133\193\137\209+\130 K\243\&77\150\211\234{\NULO\153s\ACK\230\212\143\186\141\CANl\247o+\171\136\217i/\SOH\255~\181I\255\128\239E\176\&0\224\205\SOH\141cK+q\253\t\162[\131\225o\248\144\140\173\151\204\144\&5}`\246\ESCn\180\t6U\US\251HY\210\249S6\190Q\207\195`\220H\237\165|\193+\NAKZz#\237\172\166\138\139\EOT!\STXC\210d\198\238\238\RS6\188\SYN\189\US|k\DLE\131\201\136\233e\166\\R\171\231\215\ENQK\b\179\EM[\153\139"},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495160463 1493948580 22791 (Name "openssl.org.") "\SO\204\187\243\214>\239\247\172\187\164\216\194\&9W\140\163\148\211\223\a\212b\FS\DC1\t%QpK\185gy\247\158\n\140\227\182\233\185\131\216\167\160\158\240FO\240\218\195\242\179\&7\138_?}\202\EOT\237\206\218B\156\161$\DC2\241;\246ZR)\r#3cL\STXj\223\225\ENQ\206r\135E\191\195yu\243\228:{\131i\FS\SOH~6\236\230\177\ESCS\246p\254\f1T\170\140\236\EM\241\134\171??g\228\134\229\140"},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495160463 1493948580 44671 (Name "openssl.org.") "NC1\231I\223\244N\ENQ\252\206(D\NAK\251\160\214\153\v9\NAK\DLE\224\136\200Q\173\173\239q/6\211\132\n\r\189\201%:\252\205P\ACK\168\DC2bV\167\129:s\239\211k\235}'\211\202\189\197\136\179\189\239\176\210\211fj\237\173t\243n\EM\143\215\CAN\NAKS!\243\US\197\132S\\\182\182l\165\130\CAN\175\&0\176\196P9MpMo\232\166\211\173l\rm%gy:=H\168[M\163\&7I\194\252\SOH\225!g\140\&7\DC1\215?\253k#^\184~\157\SO\189f\250`q\232\225"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 48 8 2 172800 1496626622 1494031022 2746 (Name "stanford.edu.") "\141\184\176\RS^(\172\138\t+\a}2\149L\STX\EM\140\n~\181\227l\245?\183\231\216\196\187\NUL\SOH*\219}\212h\140\161nn\176-]\168\239\135kPk* \198+\199\211l\226}\b\135\207{\ENQ\205\130\228\239\v\181\224\242\192\&5r;\151x\172\236\a\171d\128\194\CAN4\129\174\254\146^\143(>\160H\224\219\190\DC3\230K\219\220L4~\153\r\212I\FS\180\&6\225\235A\136D|\FSd\128\145*\135O\129>\185\&8\191\200`\236\NULh/K8\DC1\185\183\US&\DC1\233\209\193WP\SUB\241\155\252\a\236nie\SOI\149\ACKWb\175s\EOT\181%\251\194ihV\143v\141\198\154\165\&7+L\160\v\216\DC27\216\138/i\239\172\a_8\191\FSh\132:\215^\222b\242\&2\t\190\ETX\203\237\133+\245\RSm\255,\SOH\203\239&\204\204\142*D\166f\b\151\167\255\246\208\FS\219\v\218N\128\198n\146\205\189\130\163-27"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 48 8 2 172800 1496626622 1494031022 27840 (Name "stanford.edu.") ")\195\155\185.\192_\148h\249|4\139\174\USNY\152N\128Xh\161\225\220\191\153~\171\GS\232\193\135f\133\212\SOH\202\204?I|\233\FS\229\203\211o/\155\201\223\157#P\141\&1\199\230\136\&4\SOHC\246\&7\ESC\161\158\249#v#i\184)aQ\166\133\228\183\159C\DC1sI\FS=c\166U\248a\199\145\220\165+\255p\245\254\209\143ZxE\207 \218\198\RS\173a\195'\143\168bj\195\144\167nP\205+\230"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 6 8 2 172800 1496846541 1494250941 27840 (Name "stanford.edu.") "\DC1x\SUB\204}_\150 \168j\228\134\183\b0\158dX\216\199M\213\191\181!rK\194\149\234\169t\SUB\215:\158xr\169\164\ETB\206\243\174\171y)\245\159\225F:\139Kva\247\177\NUL\EM\171-.#Rmzt\CAN}\222\177\147\138*Y\244$\141\t\254\179\226-Q@O\v\238\216\132\169&\208\202d\237 F\v<\178<\203\&6w\157e\211H\144\233I|Y\"N\209`\v;\159\163\225\SUBq\230\GS"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 172800 1496248135 1493654460 29979 (Name "stanford.edu.") "B\164\247\168\186g\148\174\254f\201n0KD\182\DEL\191\199\133%g\246\&1\128\147:\168\140Xl\224\169k\135\&4\f\DC1P\248\143\215\185\203\&3?\128\r\137h\168\FSR \160\")\202vx\ETBb\131\&12\234\235D\141\244\220\212*\224\188v[\205\183nE\193\216s\140\186\RSH\221\&1VK\224\200\US&\137\r\220P\242\196\130\&0\ETBRD^\137\231\186/\193d-\SUB\168\243O\177\CANN\EOT4\167\"\138."},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 172800 1496626500 1494031022 27840 (Name "stanford.edu.") "\182\190W\128@\251\&7\176\172\SOH4\235|\SI\220\173\227\GS\160\EMk`\FS\155\186Z\190\220\STX\DLE\\\234\253\251hQ'\165\SI\SYN\239\236\f\129\203\RS\247H\222g\198\220\172\&6\155\186$E\160y\163\160\DC2e\242|V\225P\196\164n_.S\177\237i\ETXI\170D\238)\222*x3\157\SOH\NAK$\245\FSl\200\141\GS\DC2\EM\134I\144\201\192\223*Y\212\n\219\147u\ACK\224\ETXA\DC1\206\234\217\253\181\152 \205\187W"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 99 8 2 1800 1496759744 1494166881 27840 (Name "stanford.edu.") "4\STX^MH\DC2\235r\162\169\210\197\138\244V\227:\224\196q\204\218\173(\DC3\232\172:n\252\132\148\190\166\209\239\187\223\199\148\179}\ETBYU\th\NAK\210\r\STX\194\DLED\148 i\147tm\161`\149\234@\212B\146\241\SUB\r\146\229\220\149\173o\190#\247\txA\226f\165\180<\225\&95\245\197\214\204\215O:\190D\147\201\SOH\132G\185MC\163\&1\208Me\203\205Vp\163\175X\224\253 \245c\NUL\247\251"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 16 8 2 1800 1495233106 1492638863 29979 (Name "stanford.edu.") "r\140\152\186\197\176\159\&7\217g\215\&5\155\252\ESC\230^|\195K\201_\181N\191\194\214\a\234m\SYN\"3\172&\b\218t\132\134Q\134\131T\229\253\193\240\250T\DC1;T\SOH@I\248\255\148\185<\v\149\177ZPT\NAK\225\171\&6\ao~e|\EM^\144\151\170-i$\209\180\206\&8b\154\218\174A\133\235P\t\183\194\190p\199\163A\245\DC3Fb\ENQS\221\249\DLE\230\222\171\148\196\vG\251Z\187v\200\131\166\249"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 16 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "D.\199\184\154\154s\223\200\139\195CN\200>\238\246\156v\185}\210\201\250>\177H\SOH\DC43\166\242\f\155Mi\246\246\&7G\130\231GzO\242\251\246\208\149\227\154H\142A\SUBB`\NAKG:=\196\238Zd\248\220\232\224\164\230\SOH:\254\202u\206iI\143\238\209]]\t\197\214\240Uw\226\191\169\152|\169r\139\219\212\251H\US\DC1R\ts\223 \bK\159j\US\195\132\148x/\SUB\244\216\197;q\130\154"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 29 8 2 1800 1496560398 1493966179 29979 (Name "stanford.edu.") "\SO\230 L/\255~\184\245\220VUp\a\244\CAN$[\163\223\242\SI\ETB\180\&5\206*\v\170\223NF6\209\167\211b\DC2\133xbL8\137v\f\198\243\136\&9\192K\155\142\151\&4O\161d\229z;\f\DC3p\223\147\254\223S\133W4:\156Z\231TOF\129[xPJ\244\224\EOT\176\253i\255C\SUB?\158\168@HS\169\178\240\143H\192\242"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 29 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\158H\SUB\\\r\SI\246\208\205\252c\167\240\&41\DC3\224\&5j\240\180\215\237\b\STXp\144#>\254\196\\9\134f\251\235\tS\162T\f\129\196\&66E\182\141\202:\202\153\EM\ETB2\NAK\161J\181\222\&8\252\&8\226\145\129\135p>\US\185U\214\SOH8\246\NUL\192\ETX\DC1\252\&0>\232\203\SUB\176\248\DC1[+\219zW|z\161\238J_\132\br}\178\&5\SO\207\192\251\247\152J-s\221\224!\241aQ\153y\"\177\141\210"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 1 8 2 1800 1496560398 1493966179 29979 (Name "stanford.edu.") "\DLEj,X\RS\CAN\SOH\162\157\222\203\202\192\&8\DC2\203\169\ETB\236`t\186,,\250QMq\NULcu\214\223\211RY\189h\EOT\163+u?\154F\188\216.\206\212\223Z\216\160C\163\":\191\151]\145\&6\162=\221\169=-\207\235'h\167\129\200@\tFl>UV\242\NULCC\187_nu\154\219\GS\f\165\128\163\193\DLE\217\215\226\ACK\158\FSY\144\220o\183$\192\184\203\248c}*/\212}\182\148N\246\232\&6"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 1 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\142\DC4\180&=/\GS\178\241\186\b\199\177\246\154\&8Y\240m\DC2\160\226,\213\139\182\190\164\197\188{\ACK\163+\228V\DC4H\143@\f2\SOH7\158\198Mr\206s\150\211\144\216qs\217\DC1Y\n\209\203\STX\US\137\154D\235\191\"f\151;\ACKK}\156\188\240\173\fnz\224j\184\215\145\186\220TYm\CAN\249\165\202\247#nf\200N\SUBM*(\154\181UQN\234}\230\212\FSN7\230^\203H\133\255\143\140="},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 28 8 2 1800 1496560398 1493966179 29979 (Name "stanford.edu.") "w\255\145C\SI]\247\147\190\254\147I`\198=\198\242\f\GS\153\183^g\236\238\191\142uLJ\222\186\246M\139\234#@\184\176\253\145\176\DC3\192O\GS3t\229\215\252\tC\225@\244t^u\134['\137\222\206\251\NUL\NAK\\\f\176\151\188\206B@\210\214$>GY\139\152\DC2s\181CB\143@\ENQ\EOT\195v\232^\161\GS\166\236\176\242Z\183\183\134\153\168\255\SUB\235a\177D\136\197@\135u\137u\246\137F\196\222"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 28 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\DC4\225\222\156\174r\231}*\162\190\SOo\DC2\163\212;i4\137OD\ENQf\135\179\FS{=;4\189|\n\164Rh+\217uo\135\198mRB9\223\DC3/\236B\222\229w#\170\252\ACK\217\a\182#\232\DELhb:\ESC\244!\SYN\130\200\174\173\213\186\218\223\202\171\FS\158\194\STX\205\236.@62\130\153\147\159\DC2\208B\SYN\188\148XB\217\SOH\195\EM2WF\235\&4\180+\231+ :\ACKO\198\133\130\128P\214~"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 15 8 2 1800 1496464420 1493870399 29979 (Name "stanford.edu.") "GH\218\173#\197\DEL\175`\213\ETXj\202R\132\170\&5\t\EOT\155_\165\239}\182\195S\143\GS\195\167\191\SUBN\237R&\213\ETX\221\207\US\242\230b{\234.|\214\STX\161,\150\138\a\159\202?]\217\n\175@bh\245\210\174\140\v\174\207;G\177B\189,\239\b\GSJ\159\t!\176.\209a\217!\146\n|\165Z\214/\209\235k%\US $\220r\215\196\151\216\CAN\ETB\212o i\216d\193\\\169,\NAK0%\247"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 15 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\208\141)]A\138{\180Va\181\160[A\187\224\EOT):w\226\149Si\168\171.U\fW@\172\203\195/\136\156\222\161c\r\209\201P\\B\SOH\196\199\186\146\170x\188t\NAK\250q\246\210v\213S_\NAK.\141\RSIU\141.\202?\172\236\188\145\EOT\223P\251\DC3/+\SI\139|W\NAK%\DC2\162`)I\146\144\151\157\EOT\210\200\206}\225\NAK\216\160\147\STX\f\150\241\GS\224\DLE\162\173\"\STXA6:>\148\184U"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNSEC (Name "003004139284.stanford.edu.") (fromList [Type 1,Type 2,Type 6,Type 15,Type 16,Type 28,Type 29,Type 46,Type 47,Type 48,Type 99])},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 47 8 2 1800 1496624318 1494031186 27840 (Name "stanford.edu.") "i\218\201\NUL\144r\148\148.j\196H\245&'\138\152v\230@PO\226\188\192\210~\172}_K\168\150qO\198F&\128\220C\184\251\166\237\251\236\246.RvN\250\218\216\172T4\152b0\247\201\186\EOTg\185\&4ARl\153_s\242\212\136\f\135\191QBe\162Y\SIA\ENQ\173\233I\169\168(\SI\248\162\172'\130\197&\226\198\142<\ACK\vg\190Q\130\238n(T\235\&7\SOp^\194\187J\208\ENQ\181\151"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 46337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 40786, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 21, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSOA (Name "a.gtld-servers.net.") (Name "nstld.verisign-grs.com.") 1494175849 1800 900 604800 86400},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataRRSIG 6 8 1 900 1494780649 1494171649 27302 (Name "com.") "y\199J)\ESCiLV\160\DC1y\146Y\202z\249\&6+\239\208\159\143\178\194V.u\EOT\189\220\137\&9X\ENQ\156\DC1\189\218\237v\193=\169nJ+3\133\SUB\240\151T\200\251'\146\209\DC3\aD\DC4\248q\173\216I\234\180\&4*gJ\231\170FV\212\186)\156\219\208\165>;\249V\161U\144\237\185\192\252\138\167\253\NAK%\209\180\240\174n+\239\128'CqB\182y\175\171\171\DC2\192:U\216%c\227\160Kw\215"},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "f.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "c.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "g.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "i.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "l.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "m.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "e.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "h.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "a.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "b.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "j.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "k.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "d.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataRRSIG 2 8 1 172800 1494650866 1494041866 27302 (Name "com.") "P\166\202az\187\155\175\227w\195\202Hq2\163\228aU\231\144\203\159\196A\146!\172\USvn\193;n\170F\185\255\170\169=\235\CAN\181%\199\"\243\254\159\205\140\158\&5{p1\ETB\231vb\fv\209\203\179\DC2\132(v\140\147\222\"\181NXB\202\246s\242\n~\163\r\SUB\EOT\\\DC2\179"},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataDNSKEY 256 3 8 "\SOH\ETX\171\205/\235\a\130\203\ESC\EM\135\129\189e\EOT\229j\140\133~-\233\161\248\221?\181\200 ;m\173#\153\SUB\196\&0\192R\198]n\177Tt\214\224_\184V\141\215\154\145\209\FS\238e\244\ETX1\157\128\STX\135\a\184[\244 \254\172\&8\225'\142}\DC4\174\161$\230\217\226\149RG\143\EOT&\130@1'\a;\197/\229w\255\141Z\NAK=\160\205\207\v{\ESC\CAN\NUL\139w\175\214T\237\150J\135\229\231\132\152\130\233\171"},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataDNSKEY 257 3 8 "\SOH\ETX\195\206WM\152\203\217\NAK~\rp\210t\184I\202\SO\SO\237\154\255\197\220\204\144GIi\ACKe\\5\203\b\179\245.\RSj\245\&6\139>z\140]Ux\"\EOT\194#\153\204\238C6\153r\GS\163B8-\EOT\249\185b\194\227\223\249Y}'\166\242\f\SI\135\&9\225U\EOT\149\212\172<\SOH\193}\SO\205\DC1E\EOT_\145\ACK\131\158\253\228\196\&8\238\141\180\&4\133\GSc\234\DC1\234tl\220\233\&1\138s \204\168\129\239\135\222\203\141\139\216g\160\228\EOT\244\179\208\199\247_\243\228\176k\210.\DC2\132\240\157\139\176^\144M\191~w\170\USO\247\251\137Hu\204g\186\187{d\FS\166l\188\156\138S\140[\174\131\230p\214\US\231C!P\169h0\198\195W\179\232\157\243ZX\b?\246Kh;gA\184\174\195xou\157\143\137\205\239|\213\254\192\248#`m\ESC\247=\219/!\225\217)\195\243E\ETX/\128\228\162\EOTL\178cR\RS}\228I\183r\203\150?\SUB\189"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 15280, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 147, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 1949, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 15, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x17647aaf)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x17603435)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0xbfefd5c5)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x6828d323)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x682bc3fb)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns1.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns2.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns3.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns4.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataSOA (Name "ns1.msft.net.") (Name "msnhst.microsoft.com.") 2017050703 7200 600 2419200 3600},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataMX 10 (Name "microsoft-com.mail.protection.outlook.com.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"]}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 60351, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_mirrors.hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 3788, rrData = RDataHINFO "ANY obsoleted" "See draft-ietf-dnsop-refuse-any"}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 26541, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1357, rrData = RDataMX 10 (Name "microsoft-com.mail.protection.outlook.com.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 17, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "google.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xacd913ce)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xacd913ce)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xacd913ce)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2a001450400e0808 0x200e)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 50 (Name "alt4.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 10 (Name "aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataSOA (Name "ns4.google.com.") (Name "dns-admin.google.com.") 155321650 900 900 1800 60},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns4.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 40 (Name "alt3.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 20 (Name "alt1.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 30 (Name "alt2.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns3.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns2.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataCAA 0 "issue" "pki.goog"},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataCAA 0 "issue" "symantec.com"},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["v=spf1 include:_spf.google.com ~all"]},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns1.google.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b64d9926db52e425c8747c143b9266c1.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b64d9926db52e425c8747c143b9266c1.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b64d9926db52e425c8747c143b9266c1.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b64d9926db52e425c8747c143b9266c1.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b64d9926db52e425c8747c143b9266c1.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b64d9926db52e425c8747c143b9266c1.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 60952, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 148, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b6d7e514db902da80c8a8e124673139b.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b6d7e514db902da80c8a8e124673139b.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b6d7e514db902da80c8a8e124673139b.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b6d7e514db902da80c8a8e124673139b.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b6d7e514db902da80c8a8e124673139b.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b6d7e514db902da80c8a8e124673139b.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 56763, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.", rrClass = Class 1, rrTTL = TTL 35622, rrData = RDataA (IPv4 0x5e7e2a32)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 31, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "debian.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataNSEC3PARAM 1 0 16 "\SO\192\162\220\222"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataRRSIG 51 8 2 0 1497614849 1494156550 53598 (Name "debian.org.") "\186\DLE\205\fEe\vUb)\EM\156\201g\236\165r\226\178\136\STX~\US\v*Y\150\196\253\217c\236\&0fMO\157\184Q\227\170\CAN\190q\190\252\241\220d\230\249\175.\EOTw\f-n\164G\223\159P\149T\152p\217\147\238\178\208\147N\220\167c\224\212\138dI\169\217m\167\187\196\144\206G\224D\198\205d?]V|\134\226\r[n/\198\150\228G\198\v[q\FS\221`\223\RSP\218\DC4\142\138\"n\167\176{*S\248\\\129\141Z{a\152k\163b~\216\133~*\175\235IP\242\173\156\142ZOX\229\174\157\187\\\224\212\216~r\DEL\158|\135\NAK\135\130\233C\217\155bU\128\DEL>\177\150\161-u\177\227\191"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataSOA (Name "denis.debian.org.") (Name "hostmaster.debian.org.") 2017050804 1800 600 1814400 600},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataRRSIG 2 8 2 28800 1496661232 1493203448 53598 (Name "debian.org.") "\203\GS`3I\r\228\EM{\ACKZ\SUB\233\185\&2\154\159!\194\183\222}5\143Sz\239\240\186\240\129\251R\147\215\251\167 @\DC1H\227\207\140\215y\236\202\208+\NULi\168q\183\NAK\r\DEL\159~x\GS\137\150&\NAKt\140\a2\GS4\SO:\174s\DC3\DLEHO_\v\147.x{8\156\214\SO\128\200\163\158\149/\175\190[B\149\175^\229\ESC\NAK\164\216\247D\243\t\SOP!?\255\DC4\ACKej\145\176\f\EOT|\ACK\166w\233\194l@Gp\188\208\238_\179\219\&0\CAN4\229\GS\148\196\135\200r\234\175\&3\rB\211\184R/i\150\SOHA\207\222iri\177K\242\NAKd\241\230-\STX\DC1Eh\222\199\250\157$7\SUBf\179\149\150"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 1 8 2 300 1497698216 1494238616 53598 (Name "debian.org.") "'\233%\DC3)/\188\165\236\&4\DC2f\231Q\231J\132\178\142\222\232\182\133\DEL6\220%\212\ACK\247\184\167\vb\175\CAN\232\162\170\190FOM\RS\f\235_\144W\ETB\215\158\244\223\vJ\210=\148d\142|\220\215\&9\220\204\233F4~=9J$\a}\177p\148\255\223AIP@\137\DLE\203;>i:\250\SUB\167\159\164Z]\149\150P\US/\157\198\181\ETX\165N\DC3\197\235\140\139I\US\238\184\193M\180\132\141{\213R\251\219&8\252"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataRRSIG 15 8 2 28800 1496661232 1493203448 53598 (Name "debian.org.") "\135\164\225\200\246u(\DC1\129\NAK\224\a\141\205\&0\206\201\221\156f[\ENQ9}\\\236\157+\SYN\128\170\197f\ETB\195Z\169\209\240\189\185\&8:\EM\209\219\128k0r\\Xc\NAKNSB\233\221\241\174\139\135\253\246\130PW\129\\\142\198\223\DLEpL\NUL\188z\252\169(\226kzu\225)\238\147n\227c\190V\236\249\213\182b|@\255\169H\167\128\145\184[\220\155K\238U\235\190\tJ\ETB\175[Ua\134G2\134\225\v6mx\179$\243\186HSK]\203\"\158\167r\SO\174I\f9\214o\170J\185\128\149y\vo\175\211Py\DC3\DC4\175\US\237\130\&1sE\229bt&o~\SUB\196\134\243\DLE\231\n\253\234A\180\175"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 28 8 2 300 1497698216 1494238616 53598 (Name "debian.org.") "h;I\216\162\211\209\224\SOHa+\"\a\222\245\241\SIL\134-\225\200\170\&0\149\148*\234\208~4UG\135M\DC1\rK\US\181M\158D\220+\205\215q\229M?\199x\250 5\STX_}\167\&3\207\214\DEL\ETBAY\216=\252D\SO\174y\142\147\185s\STX\135\SO7^V:\160\153H/\151 \220\146\155\132\&5\158\143\184\164h\SUB\130\176\CAN\a}2\196\162\a\SYN\223f\130\240\211~b4-\252\151\223\217\DC2\223{z{s\134\251\171\ESCG\216\164\&6\223\211g\152\218\241\&88\SUB?\213\133\218@\175\255\EM\192\238\147\&8af\242\DC4B\DC3\220\140#\153\174\182\166\ETX\177%\DC4\f\240BC\195qL\228\196=\DC1\137\251\DC17"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 35 8 2 3600 1496661232 1493203448 53598 (Name "debian.org.") "\128\242P\211\136<\187\164D\208\213\195-\130\230q\153\156\180\161\\?)^\128\\\247\200\224i4\NULu\230|\t\215\DC4\149\254\ETB\192-\186\173tw\213\DC3\184\228\223:\202\&3\208 \179\165\161*\254&\149\138S\192.E\218\EMp\156\\\165\b\"\179v\231\132\188\222\DEL*\EM\155U\US#@\ENQh\241K.\223\&6\131\162\226o\203!\152$;\"\128\DC1B\231\187HZ\209\&3/\208\135?y\n\178c\177OX\CAN\202\161)\161\196\245\199\DC16*\210\248\174Jg#\247\161\145\177\&1A\243\212\200r\204\142\&7\165\GSl\134+-\ETX\129L\162-\154\207\SO5\248\145\252\162\v\149\169Z\154\240\DC4\242}i\182\216\187CL"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 6 8 2 3600 1497698216 1494238616 53598 (Name "debian.org.") "\141G\148\&8Ru\215~\167\220\201\a\234\142\f\136?p\174d\136E\130\135\136\&7vA\212\"x \188\189\SYN\166x\158y\236\DC18\163\241\217B\169;\200IUF\136\138\253A2Fq\150M:\174C/Y\GS\194XD\135\216\140P\DC1U\187\STX\163DM\182\205\243\185\170\165C\209,bp\195\246\236\162)\180\209\ETX\216\232\219\241<\219\158S\EOT+$C\250\174\b\237\155:\233\177@\208F\192\198\131\132zsO9@\f\247\138\SOHjM>ajU\179\t\n\222\203b\DLE\253\224\&4\240\DC4N\146ua\148\208\185\183:}\156\148\153\171\ve\180\SI\229\193\140\232\SOH\182<#?P\STX\164#3\167.\163\143\&9\205"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataRRSIG 65534 8 2 0 1497615664 1494156551 53598 (Name "debian.org.") "\194\&5v\DEL\182\184\138\201\232=\183\ETB~4\172\DEL\168B`e\SUB\128\222\190L\141\154\151\236\\\176/\NUL\209a*:c\145`\164\t\179l\206\225\162\RS\208f\159S\RSLz\182\n\a\186\207\208$#>+\150\&5\151\129\220L&\173\188\141BA\SOH\130\136\&6\DC1\141\220 \134~\149\144=\229\v*\246m\SI\DC2\207`\180\237\SO\166\167\226y\186\139\182."},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RData (Type 65534) "\b\EMW\NUL\SOH"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RData (Type 65534) "\b\209^\NUL\SOH"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\247\254\167,h*\ACK\241\143,\SYN)w\190\177I(\202\ACKiV\246nn\SUBM\bu_\239n\194\193\236\214is\140\SUB\SO\182/?\162\140\b\182\187\179\rD\223\139&\214\165y\236\r0\SOH\137\249\252z\EM9\247\165(\EM\143\">'\230\GSX?\188t\228r\185\168\&5\173\SI\180\226/\203\140\154D\180\239\207\&4\234\ETX\236\252\245\NAK\tK\199\138\243\NAK\177fwG^\253S\211\192B\186\151W\252\SYN\199\206\&4\FS\243M"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\151\229\ETB\218\252+\173\&2\GSK\140\207\236\249\f\n\187M\129\160\216\169\186\152p\n\CAN\161\204}\153\207\241\ETBr\128WZ\237\CAN\245\151\184\&7\240\226\US^\243\&0\133\140\141\231 \139z\209\150\227x\182\191V\187e\SYN\169#\162W\222\157K\DC4\234mJ\172\130#4\146\f\175\191\255 \191\251\182\244A\\\134V\197\218\186\194\NAK\150L\173B#\222\242-\209\SIP\250b\DC1\231/\151\a\252\SYNC\160\DLE\US<\251liLSc\SOH\185,\247\218\143\239\181:\243\164\191I\165\157\184\177\134\187O\150\179GE\ESCaU02qR!\199R\172\STXita\157w4h\219\218\241\206\210v[\165\193}:\STX\DLE5\157\166\144\EOT\194\247\231\164\191-\222\186\\\144\222=\224o\230\194J\189\211\160\241\240\242\163\167\238\f\SOH\238L\159\DC4\132\208\171F$\161\169\GS\173\224w\167/\191\142\146wY\235\245\231\&1<\252\234\148-\NUL\137\223y"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNAPTR 10 0 "s" "SIPS+D2T" "" (Name "_sips._tcp.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200104f80001000c 0x15)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200106101908b000 0x1480014)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200141c810000021 0x210004)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2605bc8030100b00 0xdeb01660202)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataMX 0 (Name "muffat.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataMX 0 (Name "mailly.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x599e704)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x801f003e)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x8259940e)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x8cd3a6ca)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x9514040f)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataNS (Name "dnsnode.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataNS (Name "sec1.rcode0.net.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataNS (Name "sec2.rcode0.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b90b636aee4f847240da4e2606eb64af.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b90b636aee4f847240da4e2606eb64af.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b90b636aee4f847240da4e2606eb64af.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b90b636aee4f847240da4e2606eb64af.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/b90b636aee4f847240da4e2606eb64af.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/b90b636aee4f847240da4e2606eb64af.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 8824, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.", rrClass = Class 1, rrTTL = TTL 35774, rrData = RDataA (IPv4 0x5e7e2a32)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 49467, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3376, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 17605, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 885, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154963 1000 1000 1000 1800}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 38134, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataPTR (Name "ghc.haskell.org.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 18218, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3478, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 19714, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 890, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")},MsgRR {rrName = Name "e1863.dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 10, rrData = RDataA (IPv4 0x5c7ab450)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 1121, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.google.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 129, rrData = RDataA (IPv4 0xd83ac9e4)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 30614, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.google.com.") (Type 28) (Class 1)], msgAN = [MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 186, rrData = RDataAAAA (IPv6 0x2a00145040070816 0x2004)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c4506200f514568ec9a2d42663a1e77d.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c4506200f514568ec9a2d42663a1e77d.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 25, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "ietf.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataSOA (Name "ns0.amsl.com.") (Name "glen.amsl.com.") 1200000348 1800 1800 604800 1800},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 6 5 2 1800 1524762969 1493223555 40452 (Name "ietf.org.") "P\143\164/\211\&9Cmr\144#p\138\f\131\ESC\220\RS\DC2\153v\209\SOHv\SOL\153\223\227\ETB\186\NAK\180\&9\189A\138}\160]\220!\212\244\t\131\DC2\176ag\RS_\136\250\233\159\&9\250\239\EM;\NAK_\156\171\212duq\194\211\211\207m0t\194;\246\222^m\249\189\252\131\210\189\175\ACK\144\199%\179J\206\190\139\ACK\220\230Y&\211&b\202'\227t\152\SYN\184\173\254\247\235X\243\197\&7\174\205\DELD<\231Gt\215o\228\ENQ\164\ESC\192~\166y1\232>n\202\217\252>\200\229\233\133\&7&\180\138\134\ETX\160\195\226\\\198\232\253\250@\154G\NUL\DC4\175\197\145\250\USa\143\DEL\149,\160._\DC2\162\216\242E\174:\"\236;\255\154\147\219iF\"\245e\236\&6\134$a\241c\217\DC1\193c\182O\160\238XL\203\230K\228\DC1\135\135\&7`Y\248\EOT2\156.\146\SUB\158\&4+\238\STX\142\182\164\FS\ACK&\143\186*F:@\222U\149"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.mia1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.ams1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns0.amsl.com.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.sea1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.yyz1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.hkg1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 2 5 2 1800 1524763120 1493223555 40452 (Name "ietf.org.") "\196-\224\241\235A5\213\186+\136\SUB\201\171\186f6Y\163\US\GS\211\152@R\154l\166\FS|\208\246F\251\185\180\SI\ETBR\130\131~\200\214\RSl\144\157\a\137\216\236\&0\ETX`\188\DC2\137t\ENQ\188A\255\144Uj\179\151\205\SO\197Kw6\169\157\133i\EMWA\GSo\135\224HP\US\174\243 \219\208\a\248\187\220\218\240\ACK!\132R\243\150\&2P\EM\180\161\ESC\179%\ETXiBx\149\160\156\155J\SOH\239f\201\213)\173\240qD:&)\146Kf\202\195\b\175\161O\220\DC2\213\\*\209\200\EM\228\173\208\163q\154\EM^s\138\191S9\191\232\170\181\232 \131\227\131\151e?k\DC1\173\205\f\197/\183y<\ETB\205\170\244\143\133\232l[\149\&1\SYN\202s\220\&3\135\173+\STX\136z)=d\226>\188\139\151T_?\USe+\EOT\196\SYNC\196\128\144Du~9A\136*\154\219V\DC2\195@\DEL\209>\135\182\150\131\149~\132a\141\138"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataA (IPv4 0x41fc62c)},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 1 5 2 1800 1524763086 1493223555 40452 (Name "ietf.org.") "]t\133\144\&7}\NULV^\200\165\FS\187[u:<_\238\172\&6\217(}\226\b]\151}ve\180\186)5\255\FS\ESCj?>_\202\226\210\185\165\202\128\v\173\204kn\SUB\242qm\\\203Ce'\242\222\228r\223\243;\ESCa\DC3\NUL\165\&6wAf\196\"\253\200\231\198\140\200a\227\&6K=?\v\FS\162\245lB\161\160\\\ETX\f\r\176M\218\134\US\176Fi\208\174\209\202P\160\DLEC*\200\&8\191ou\190\DC3\226\v\156r\144\DLE\171\&2r=\187\157\v\184\169\235\163\ENQm\242U\f v\aOmR\142\227K\v_\n\239\249\177\161\217\134\&0\250\208\221\130\DC3\136\189\139k\228\210.em,M&\237vU\227\214\193\US\148|\198\DC4|\128,\177}\133\144^+\148\143\&6\197B\ACK[\204\DC3`\147\134U\219\170#\132\199\183\196\154\179ZGQ\247)l\187\&2\SYNf\237\202p\241\253\230\145\251j\NUL\224\146=\ENQf\SI\180"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataMX 0 (Name "mail.ietf.org.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 15 5 2 1800 1524763100 1493223555 40452 (Name "ietf.org.") "\ENQ>\186\\\164\202\156\DC1\201\251i\187\244\236\&3\189\195?,4t(\165r\\p\221\195f_\186$8M\b\147L.n`v\248\167\&5\220\240\156\179\&9m\242<2/\203\229\168}2$k\231\NUL\247R\\\155K\186\134U\ETBg\165g\196\190|#\US\176\ACK\192\242\ETB,\FS\151\231\217\NAK\143z\194j\138\&8s\164\US\252\247i0\RS\201d\DC2\170}\204;\NUL\187\ETX\249\DC4\219\165zg\DC3\241\201\223mp\215Yb\176\242;w\137ZV\193\192\243\211\SO\157\235y<\DC2;<16n\190\202\147\152\133\206\144\203]\148\204\224\172X^\211\200\192\225\223\128M\169\192<\253W;E\241\EM\253W\173\225$\226\159\t\195\200\222^\242a\196!\176x\149l\251\141\227ya8:\197\STX0\238\230\DC2\DLE\187\175\DEL\209\188E\133\131\179(\147\214\130ta\ETBK\188uQ\178\199/\228\a.\NAKi\149\172\NAK-^au\ACK.\215j"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataTXT ["v=spf1 ip4:12.22.58.0/24 ip4:64.170.98.0/24 ip4:4.31.198.32/27 ip4:209.208.19.192/27 ip4:72.167.123.204 ip6:2001:1890:123a::/56 ip6:2001:1890:126c::/56 ip6:2001:1900:3001:0011::0/64 ip6:2607:f170:8000:1500::0/64 -all"]},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 16 5 2 1800 1524763104 1493223555 40452 (Name "ietf.org.") "\136\157Fpx\200\192\178J\227\"cT\254\180\217r{\216\228AQ\EMsM\253 \180,\248&\149\220\196:l\153\202+\SYN\224\CAN\156=\SO\174\241\168\254\215\181\180\194N+\171\197e\156\NULE\141EMPg\247[\DC3\202\SUB\248\180\EM\144K\SI\210\240\129hhi+G\204\SO\152A\221_F:\FS\253}\DEL|\141pk&\GS\160\130\254i9M\STX\162\231&\142\222fW\210A\149\221y\185{\GS\156\237!\212NI\DC2\144\226\197\146\vJ)\212\134l\SO\243\RSu\178'\181y\NAK#\224<\233\230\186^\253\222\208\215\SYN6\151]oI\189\172@\DC1\129\195ga\221\182\ENQ\189\164\244\191\173\163\247gCl\131\177\196\164\226\184D\229@\132s\131\161\162w\165\"2\164\168;\135\199\225\251\&7&\134\194\177g\153\rJ6\164\"\220\136\160g\207\129\184\200\167\ESC:\238\EM\154y\177\&2\242\246\238\149\228\DC29R/\211`vs"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataAAAA (IPv6 0x2001190030010011 0x2c)},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 28 5 2 1800 1524763044 1493223555 40452 (Name "ietf.org.") "F\221\216\166\163C\171\ESC\210N\225! \155%4%@\ENQ\251\170\179\SYN\187UJiQ\214\&6\169\b2\198qz\145gY\240^k\232\247$\237\&9\156D\169\CAN<\138\128O\174\171j\207\NAK\129\254NH`nlY\SUB\NUL\238\206\176\156\aN(\186\&9\199\198C\140g\EOT\179\210\232Tq\203)\226\160\218\163\&9\203\NUL\133\223\NUL4\239\181\133\DELgh\143o\146\157H\DLE\NUL\168yJwc2\201\"\254\230q\201\bei\185\197\230\156\141\GS;\159\204\176\"\242\ETB\210T\217\254\236#-'l\187t/#'\236\183 \174/\181\200\160\198\SYN\fw\153\244\207?F\v\NUL|,Q\133\176\185\212]\207\ETB\DC29\148j\189\229\229\177\DC3\219|\244\146\215\STX\208\DC4C+\139\192\"\130\150\192\149\175\188\196|o,\148%\154\v\135\224\172ko\228\v\233`~#\151p\128\147\134\170\235\133\208Ekl\245r7*t\254\193=?\180"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNSEC (Name "ietf1._domainkey.ietf.org.") (fromList [Type 1,Type 2,Type 6,Type 15,Type 16,Type 28,Type 46,Type 47,Type 48,Type 99])},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 47 5 2 1800 1524763055 1493223555 40452 (Name "ietf.org.") "\ENQ\218r\154>Lin;\254\238F\NAK\ACK6\r\184-\192\237[\STX\250\184\&8\232\202\154b\t\204\129;\221\NUL\DEL\v*!8\178\169\201\ENQ_\199Yn\162\137\177$\a\159M[,\202U\DEL\155P c\254N\197\&7\233Y>)f\224}D\142\146\166\191\136\226)x\168\237I\133\194\233L\144c\DELU\185\255\158\DC2d\187\155\211~c\186\&7\169#\233\&0r\DC1\SYNg\181\196\179\141}V\ENQ\142\SUBW\165C\135\ETX\EMV\US\234%\243f3\213D\141\&1\DC2\195%\SYN\195\253\ENQ\239Q\a\245Z\RS\159'\223\159f)\185x\168\GS\a\195q@8?\190\150^\215$\140$\221\211\EM\144\246MK\vp\172+\158hE\135\254\b\164e\175\&1q\SYN\205\146|\178u\255\198\155\&8[\237\247\211\210\253\157A\222\FS\FSkHv\156\220\172!p7pv\174s\153\248\f\169BVY?\246\129b\250\255\DC4\174\238\EM\243h\237:`\146"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataDNSKEY 256 3 5 "\ETX\SOH\NUL\SOH\208\196\t\168\199i8\223J\131Sc\159\SYNp\SYN\161\212\FSO)R\a\a>\b|\184\223\168\203\226\186n%\128\171Jd\183\189\236\&8\t\231\243P\172\209\ACK\EM\t\171\233\242\175R>\187q\250\217R\136\217\217\193\145\139\&5a\130C\170g\219\FSi5W6\229\203\&3\148\240\237U\142T\135\RSyp.\184}\166<\136\132W\163!%\133,[\167o\152\219\t\225|\STX\128\216+\160\t\151\134\131\EOT\137a#\EOT\US\176\141\134P\228kY\FS\DC1JUp\STXId\226\n\215]\GS\203\158\&9\228\149>.V\US\222\NAK\150\230\225\GS\248\178\180\211\217.\179\155\133@\135O\169\&4\180\209:\166\DC2\232\RSu\214S\238\175\166\198)\207\161\161\&3\SI\209\244\DC1q[\147\221\170\166\195\159' B\201PZ\fq\191\193u\DC2\224o$\222\186\177e\159\ESC"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 48 5 2 1800 1524762971 1493223555 40452 (Name "ietf.org.") "R\220uL\178\139\238\216\181br\231\GS\128\250\205\243\&9d\165\185;Q\151\&6+n\a\148\169\152Fy(\244R\FS\131\ACK\137\229\167\199>R\RS\192\238\NAK\215\241m\"\200\174\132u\FS0C\DC4]\249\244\198.\138\221[K\164\SOW\SI\SYNcV\146\196\229#4\173\216\201^\128~\tHcSY\131\SI\229\238\191\GS\161\180zV\167]\216\216\163\CANb\211\ETX\\\SYN\234%\152\&4\231q\200H\129\245\253\224S\248\no\GS\195D\149&\ENQ\152HRi`\181\228\189\214\203\176\CAN\209&,o\239\222p\147\203\213o\163\179d\161\229\132\170\r\ENQ\251S\168M\232G\151\189\206\&7M';\SI\201\136\DLE\168\212m\200c\210-H\n0\ESC\157W\DELg\NUL\240\"XE\228\243W\236\170P\202\167U\ETXm\166\&9\162r\151\134\223\179\DC3=T\STX\158\180\226`\131S\DC3\235\199;\128B\149H\170\134\ENQ\253\156\166\141\236Z\161\228\186\175\DC3"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 48 5 2 1800 1524763006 1493223555 45586 (Name "ietf.org.") "X\165A\218{\a\DC1\163\238\178 =\153\220\241\150\231\ETX\164\230\FS\199\233\r\218\t5\ETX$\182B/^\215\235L\175GP\133\153\230#\204(\179-\243/\188\ETX\192=\148J\n)\160\a\247J\251\133\209\223-f\175\DEL\211\227\170\197\SOH\ACKo8\247_\DEL\189Gjf\251X\166\221\207\&7b\142k\208-g|\SO\169\128\f\221\139\130\181\128\185o\220g\151\219B%\204\v\237\129\&7\249\&4\149\217\205\209\160'=\211 \187\152i\213\213\192H\178\153\&2\161\181\128\189y\132e\136\DEL\235\244\180\207U\245C\128\207\230lf\187\196\128\&8\250\SUB\177\224^k\ETX\FS\195\&79M?\189\NUL\161\178\&5\183\228\DC3Bxy\244\221\153L\145\154~0\173o\130\160\155\213\254\&3\ENQf^\255\157\188\&1%\146\US|\232\SOH\n~\ESC\239d'=\245\&7\206\a\ETX\SO\245Q\ESC\227\242Vj2\182\175!\206\223%\231\ENQ\172`\222\b\209\EM\234\172\&2"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataSPF ["v=spf1 ip4:12.22.58.0/24 ip4:64.170.98.0/24 ip4:4.31.198.32/27 ip4:209.208.19.192/27 ip4:72.167.123.204 ip6:2001:1890:123a::/56 ip6:2001:1890:126c::/56 ip6:2001:1900:3001:0011::0/64 ip6:2607:f170:8000:1500::0/64 -all"]},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 99 5 2 1800 1524762978 1493223555 40452 (Name "ietf.org.") "\b\DC2k\193\248\172\212\218\130l\131\247\202O\248\132\254\237\158\178\180\167\229X\184\v<<7\152\233\178v\172\220\161\158\171\232\254\165\NUL\147\FS\STX\251\&1\189Mc\230\194\197\192y\140\221tc\SYN\USC_>T:\STXF\135Z\225\&8\130\FS\ETBhZ\178Hc\GSS\171g*t}\255\137\146\217>@\230\232\141\176\SI\185\202\202Ad\EOTA\133\240Vk\204^7\212\158\&9\135\CAN\226\188!\145\129\132\213%\234\207\219\tTsN\135\178\SYN56\DC3q\216\192>,\197\194K\198\229e\132\231\b\232("},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataNSEC (Name "3D-Printing.nasa.gov.") (fromList [Type 1,Type 2,Type 6,Type 15,Type 16,Type 46,Type 47,Type 48])},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 47 8 2 300 1496749007 1494154805 34113 (Name "nasa.gov.") "\bG\199@\n~\164\158\155\214\EMa\130\134\160\184C\250\147\156z\197q\165\249\DC3\155\250\b\NAK\EOT>%%3\132%[\n\179\137vh\135\205]\SI[\187\181@\190\a\168\178qW\252\245\229F\177Wt\188\170g\133\211A\236\154\SOH\159V\DC4o\NULA\EM\200^\182+9\170tR\220\&5\236\152em\222\161Y\159\&7c\211y\162R\228y\128,dz\156#jR\168&\214^\166\147\227\223\170\135\131b\156\226"},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\188\&6\253\240\DEL\139M\ESC\154>W\159._q=\206\151\215\162\"\182M\218\218\rj\171\188A\172\197\170\213k\171\238\SO\206a\171\145\144\185ZH\235\212\145\&7SN\133\156]6R\DEL\141\216\236g\128\222\159G\ESC\205z\"A\176]\216\&35hB\221\187\248Qd\146\ETBt\221\151\168\EMg\159\156x\155\218\148\&8\143DC8\223\136:3\202=\226\198=\157)b\169\172R\128\175\DC4V\216\232\192\232\EOT\231\203"},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\193\145\233\ETB\182\"R\233g\EM2\179\191\171\161h\159\143*\247\169q/\142&\SYNM\202V\224\SO\221\133\178U\223\DC3\175\158t9\220\128\ENQP=\FS\209,\133\130\159s\227\136e\234\195\136\ACK\140H\ETB\231\176\DEL\147\252c\SOF\FS\151\174\172v\140\&8U\139\137y\228\b\EOT4\DC2\136\174\255F\205\SO9\187a\190Q\ETB\234\182\DEL\ETBm\NAK\209y[:k\150\161\DC4>\134\131\ETB\245\167\199\134\226\244\222\214G\222D\129&\DC4\195\NAK\RSr\188\174\195D\217\129A\236 \DC4\NUL\200qzAwt\210\180\ETB\160|/,\167\"\193\137\188\154\185\165\DC2^]l_Qq\ETB\166\242 P\154\208Zm\SYN\\\229@\229\154F\229T@\254\&8\220\134t\237\156\220|\SOc\EOT\239\SI\240\FS\\']\185\157L\190\206\133\130\208\162\143\220\156\180\152y\US~\STX\207\EMA\173\235\ENQ+8\DC1#\236\ETB\162\161\"\f\SOH\168\177\180\201\138\t\STXv\133"},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataRRSIG 48 8 2 600 1496750400 1494154800 34113 (Name "nasa.gov.") "R\166/W\NAK\SYN\253e\153\EM\142\201m\170\246\205g%\230\\I-\134\251T\170\228\154\221P1\DC1\NUL\223\234\245\171\243\190:\225\133\218\&4\247\195\ACKU\180\NAKJ\147\140x\155O\250VK\155\205\201\&3\137\&1=\180\153\170A\229f\SO\ENQ\164\SOU\221\\\178RM\DEL8\217\146\245D\161r\182\140[6\247\164,qX\202\247X\173\193x\222\210!9i6n \192 \196@u\177fi&4\209b=\225\196\248\160\223\nT\250\131\254\183\254\221\202\RS\140|\134\171\252\EM,\225\234\199\247\DEL\149/\189\152\214\215\218\186\240\&2[P\152\208\180\US"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNSEC (Name "www.example.com.") (fromList [Type 1,Type 2,Type 6,Type 16,Type 28,Type 46,Type 47,Type 48])},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 86400 1495006082 1493148678 21214 (Name "example.com.") "\a\223\141iM\f\bo\160\139\192`\255Y.\166VO\178\DLED\161|8\STXB\252\SYN*\164\129\ESC5\DC3\v\\ZV?U\216\135\DC3\f\248M#\SYN\142\164\143\217X\233\ESC\159\NUL_\DC4n(\157w\FS~\145R\178\166\229J(\159\209\184|\251\220\238\237SO\139\209\147\220\&0Xv\165\201\GSH \251\&2\135\154J\194\ETX\199' \RS\132bb\243\148E\168\158\172\US\228\ACK\241\174\169\201\239\225\243\&6\DC1\255](\153\161"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "a.iana-servers.net.")},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "b.iana-servers.net.")},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 28 8 2 86400 1494925308 1493148678 21214 (Name "example.com.") "\DC4\224\&0\233w\r&>\182\142\167\220\207t\ENQ\US\243\149\128\230u'P\233j\164\248U1\NAK\182\146\235&\ACK\DC4-l\163,\191n\153\248\r\ESCH\229\134\209eh\163\132\169\247\ETB\234\DC4\176\239\187\208w\US(\220\242\&5DpoD\207\167\r\GS\169\ENQDd\152\ETB\179\226xG\217\ETXm\177\196\182\215H\255\221\v\DLE\179\226\GS\SOH\171\167\174\155XX#q]\164*\DC3m\195\175\227\205 \187\140\213\154\250Ea\253z\STX"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataAAAA (IPv6 0x2606280002200001 0x248189325c81946)},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 1 8 2 86400 1494974036 1493148678 21214 (Name "example.com.") "\DEL\147H\248t\140@\163\130\DC2\DC1\200\217\225\190\140\132\t\197\197C\164y\223\ENQ\228\195\201\153L\SYN$\179\177EE<\ACK`u\188F9\199[\165\171\177w\192\188l\159\229i\169\254\&4Q.\ACK\214\188\196\166\191AV\255\SO\232\&7,\225V5\255\NUL\186V\246\198\159\&4\164p\243\168+?rz\a\234l,B\208\224C\EM\142\221\181qw\154\164/&\144]\a>\188\223\&9\142h-3\STX\170\231\183Kr\164a\205\228"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataA (IPv4 0x5db8d822)},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataRRSIG 16 8 2 60 1494968390 1493148678 21214 (Name "example.com.") "\149\vd\208\136+H\224\213\r\246\&2\CAN#\251\233q\SYN\157\220j@2/\157\242\215\173y\ETB\154\135\199\209R\253\\1\DC3Sof\139\143\229\251p\139O/\209\199\US\ACKL\138A+\134\a\187\145\222!n[\252\227L,\NULkj_\219K\163x\252_1\175\161\212.V\CAN\193\215\197\218\248\162\178\&1US\144NY\216#c\230\252\247'\135\160\237j\EOTf\152J\b\SOS+\213\242\SUB.}`@\130\133nm\225"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataTXT ["v=spf1 -all"]},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataTXT ["$Id: example.com 4415 2015-08-24 20:12:23Z davids $"]},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495402611 1493547398 31406 (Name "example.com.") "&\236\\[/n#V\ENQ^\212\n\240\156\239\162\DELQ\211\241w\135\&9o\253\132\218\184s\218\210vn\180C\SI\255\SO\141<$\"\214r\141\n\173\223\248CCP'\132d\NUL,\DC1Q\134J\209\239\f\197e8\145->d\150\232=\153\191\&1\198\139\219\NAK\SUB\231\211\149t;\147[G\211C\190E\177,\GS\ETX\SOa\140\193\166\ETX1\248\EM\200#\\\130\231qF\177\230\140\243\164\SOD\162\201\165b~|\am\242\206j\197\STX\239\250\168\251~\USk\SOT\195Tbl3\136o\162\164\172\158!\128e\215y)\184\162zW\199V\246x\160\233\207S*s\ESC\240\203\&6\174|[\GSmz\NUL\249H\RS>\233\132\f[\ENQ\147\148Q\DLE\DC3\142\208c.\147t\133\229\140\rwTG\179\&4\ETB|&\163KP\a\182\178\174:b':\140o\DC2\f\143\167.S\143\FS@g\187?\209\132`Qf\FS\199\196\148\194\tX\233\166"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495402611 1493547398 45620 (Name "example.com.") "\ETXNp\\\169\139\179\160\GS\DEL\225\247F\ACK\207\199M\197\218s\CAN\140B\194\199\218\SI*-\194\172\245\195d7\DC3\USa\236Q\225l 2E|\242\n~J\rq\234\175X%+\196y\189\&4\218\143vl\151\152\212e\223\134\135\145\166\226\201\213H\221V\254\216\177\242s\SYN\148?\192[\152\168\240\SI\130|\154\ACK~b\224wl\DC1g\236\b\149z\150a\SYN\\(\207\a\250\&8\154g\ETB\200\US-g`\EOTm\230$Jn\235\152K\222^\STXSf\136\130\CAN\248\170\179Y\243\152\&1y\143\DEL\\*]\r\SYN;\f\DC3\224~\ACK\150\214\130E\158\182\186\v\191j\131=\244\161/[\DC4\234ya\242\248\STXs\220\225K\203nM\v\241\252v\213\221\135\133\153,H8Z\138\DC4A\188\178`\136L\245\208\245\145\210c\t\154\159\244\146\"E\134\162\174\192\250\135\143$\143KT.\249}\SO\212R\215\140\214\153\DLE1r\247B\GS\161"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\179\133\ETX\EM~.KtP\200%f,\202\DLE-@\197K\188\206X\250\228\166\SUB\181\RSp\ENQc+\135_\DC3c2\191\138\SO\152\214\222XM`\142\235\198\242\158\138\233\&6\239_\168\209@-~\219V_\DEL\131&\192\210\253\EOT\132_\157\129y\168Q\244W\238K\f\SUB\NULo\181\246\182\253\143Z\222IW4\186\164N\204\200C\131\196\&1P\163\182\188\165\215\208^\247\243\228\NAK\224\189!8\224\&1\DC4,B\EM\129\223\215\178\&1\137\218\151\231\247mLJ\147\135\234\237\203\132SG[F\155\158\224\DEL\205\234\&3\238qu\142\194#\NUL\145\&2a\130\SUB\160\203\234=\NAK\242)\250\212\DELzb\154\163\222?\194\149W\r\195\223\228\GS|\143\188s\217+\211O\CAN\174\168,\194\&2\219\&1\158)\EM\GS\202!\214> \249\141A\243\&2\f\"\250\196\&3\234Y\SUB\CAN\DELb\231\248G\NUL\129\129\166\STX\139\216i\136\197\149\189.\SYN\a}\217A\CANV\"\150\188ze\169X\248\147W\ESC*\162\DLEB\212'\230\228Q\128\218\162\252\233.L[ob\220\218{\ENQq\200\174\219\248z\190\216\227\156`K\ACK|\\!\DC4vbu\213W7\n|\174\USZK\139F\a\178\206\&5"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\169\210\128a\180\148\180\210W\214,\198\215\161\155\158\247\ETB\140\198l\223\200\157\181\187s\250\228\NAK\205Z\173t\251\ETX\246\234a\254SV\196HDL\SUBK'KH\221|\176\223\178+\219\237\247h\179Y\175\144y\171)\132\203N\221\160\&4\227\190\140\137\f\227\170g\142\161tw\247\ab\230b\169\238\211\218\191\161\145\183\196\134l\FSY\241\150\134\131\SUBc\240\140\DLE\243\172\FS\SO)\144\211\FSH\160\225\224\ETX\217\238\SO\142\233"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\157\SUB\170\237k'\170+')\235E\243i>f\178%\154\NUL\199\210\FS\219\244e\245T\SYN,\193\242\143\FS^\155uTJ\131T U\196E\ACK\227\208\SIN\130\157\&3\f\207X!\199\n-\ETBz.e\162\f+{P\148\&1U\208\254\133\230\249\DC1\206*\150\161\166\201\DELL\r\166\228\189}\141\188\204,Q\231\ESC`\SUB\188\161w\147O\210\209\152%-\244\165-\253c\162\232\&2\132\v\SUB\ACK\253\181\147\202J\215\200\DC4|zP\254I\ACK8\220\224\NAK\142U\171V[G\198\nx\254\184A\n\244[\153\215\229\186v\143\"\v\182\237\225\&6S\137\178\r\"\211\241\174\NUL\210\176y\184q\184>C\154\245\210\DC1\179\220\180\208\205\166Y\254%\200\247\158\238\248\185}\236\&6u\182\178\GSy\162xg\SUB\NULz\241\239\163F\NUL\NUL^c\DELw\198\&9f\f\215\DC4\144]`\164\213\148\149\174\USY\150\219i\132\&3\ETX\221\230-\218\231\131\227"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 6 8 2 3600 1495444812 1493601562 61845 (Name "example.com.") "t\209\CAN\EOT\EOT\GSwz\237\DC3x\151!\151\255\215\145\CAN\189l\233uxt &\218\137\ETB\205DU\RS\166\240\&7x8\246)\176>\138O\187j\215\148\250\142\213h\160tCR\208|zV&\167\243\130Y\233'\NAK\160k\184\209\SYNFZH\224]\138\235\181\253\219<+=\154\143jo2\213d\237\206\207\NULAY\151\130\f\nD;\137\ACK_\141\240vW\148i\196/\v\DC1s\221Sl\241Y7\STXy(Z9\209"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 52146, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2306, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 7192, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 891, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")},MsgRR {rrName = Name "e1863.dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 11, rrData = RDataA (IPv4 0x5c7ab450)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/f07dc1a95f1663525bf32957288adb78.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/f07dc1a95f1663525bf32957288adb78.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/f07dc1a95f1663525bf32957288adb78.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/f07dc1a95f1663525bf32957288adb78.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/f07dc1a95f1663525bf32957288adb78.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/f07dc1a95f1663525bf32957288adb78.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 56182, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3342, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 20129, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 823, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154901 1000 1000 1000 1800}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 62613, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataPTR (Name "ghc.haskell.org.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.1/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show 2017-10-26 22:24:39.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.1/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Msg {msgHeader = MsgHeader {mhId = 15722, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "4.4.8.8.in-addr.arpa.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.8.8.in-addr.arpa.", rrClass = Class 1, rrTTL = TTL 86285, rrData = RDataPTR (Name "google-public-dns-b.google.com.")}], msgNS = [], msgAR = []} \ No newline at end of file diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/cbits/hs_resolv_config.h.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/cbits/hs_resolv_config.h.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/cbits/hs_resolv_config.h.in 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/cbits/hs_resolv_config.h.in 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,72 @@ +/* cbits/hs_resolv_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_NAMESER_H + +/* Define to 1 if you have the declaration of `res_nquery', and to 0 if you + don't. */ +#undef HAVE_DECL_RES_NQUERY + +/* Define to 1 if you have the declaration of `res_query', and to 0 if you + don't. */ +#undef HAVE_DECL_RES_QUERY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of `struct __res_state', as computed by sizeof. */ +#undef SIZEOF_STRUCT___RES_STATE + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 in order to use res_nquery(3) API */ +#undef USE_RES_NQUERY + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/cbits/hs_resolv.h cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/cbits/hs_resolv.h --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/cbits/hs_resolv.h 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/cbits/hs_resolv.h 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,128 @@ +#if !defined(HS_RESOLV_H) +#define HS_RESOLV_H + +#include "hs_resolv_config.h" + +#include + +#if defined(HAVE_NETINET_IN_H) +# include +#endif + +#if defined(HAVE_ARPA_NAMESER_H) +# include +#endif + +#include + +#include + +/* This is usually provided via */ +#if !defined(QUERY) +# define QUERY ns_o_query +#endif + +#if !defined(USE_RES_NQUERY) +# error USE_RES_NQUERY not defined +#endif + +#if USE_RES_NQUERY && (SIZEOF_STRUCT___RES_STATE <= 0) +# error broken invariant +#endif + +#if USE_RES_NQUERY + +inline static int +res_opt_set_use_dnssec(struct __res_state *s) +{ + assert(s); + + if (!(s->options & RES_INIT)) { + int rc = res_ninit(s); + if (rc) return rc; + } + + s->options |= RES_USE_DNSSEC | RES_USE_EDNS0; + + return 0; +} + +inline static int +hs_res_mkquery(struct __res_state *s, const char *dname, int class, int type, unsigned char *req, int reqlen0) +{ + assert(s); + + int reqlen = res_nmkquery(s, QUERY, dname, class, type, NULL, 0, NULL, req, reqlen0); + + assert(reqlen <= reqlen0); + + return reqlen; +} + +inline static int +hs_res_send(struct __res_state *s, const unsigned char *msg, int msglen, unsigned char *answer, int anslen) +{ + assert(s); + + return res_nsend(s, msg, msglen, answer, anslen); +} + +inline static int +hs_res_query(struct __res_state *s, const char *dname, int class, int type, unsigned char *answer, int anslen) +{ + assert(s); + + return res_nquery(s, dname, class, type, answer, anslen); +} + +#else + +/* use non-reentrant API */ + +inline static int +res_opt_set_use_dnssec(void *s) +{ + assert(!s); + + if (!(_res.options & RES_INIT)) { + int rc = res_init(); + if (rc) return rc; + } + + _res.options |= RES_USE_DNSSEC | RES_USE_EDNS0; + + return 0; +} + + +inline static int +hs_res_mkquery(void *s, const char *dname, int class, int type, unsigned char *req, int reqlen0) +{ + assert(!s); + + int reqlen = res_mkquery(QUERY, dname, class, type, NULL, 0, NULL, req, reqlen0); + + assert(reqlen <= reqlen0); + + return reqlen; +} + +inline static int +hs_res_send(void *s, const unsigned char *msg, int msglen, unsigned char *answer, int anslen) +{ + assert(!s); + + return res_send(msg, msglen, answer, anslen); +} + +inline static int +hs_res_query(void *s, const char *dname, int class, int type, unsigned char *answer, int anslen) +{ + assert(!s); + + return res_query(dname, class, type, answer, anslen); +} + +#endif + +#endif /* HS_RESOLV_H */ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/ChangeLog.md cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/ChangeLog.md --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/ChangeLog.md 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/ChangeLog.md 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,19 @@ +# Revision history for `resolv` + +## 0.1.1.2 + +* Clarify/relax licensing terms + +## 0.1.1.1 + +* Improve Autoconf script + +## 0.1.1.0 + +* Use Autoconf to detect which library (if any) to link for `res_query(3)` +* Use reentrant `res_nquery(3)` API if available and signal via new `resIsReentrant :: Bool` constant +* Expose `DnsException` and `QR` + +## 0.1.0.0 + +* First version. Released on an unsuspecting world. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/configure cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/configure --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/configure 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/configure 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,5099 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for resolv 0.0. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and hvr@gnu.org about +$0: your system, including any error possibly output before +$0: this message. Then install a modern shell, or manually +$0: run the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='resolv' +PACKAGE_TARNAME='resolv' +PACKAGE_VERSION='0.0' +PACKAGE_STRING='resolv 0.0' +PACKAGE_BUGREPORT='hvr@gnu.org' +PACKAGE_URL='' + +ac_unique_file="resolv.cabal" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +EXTRA_LIBS +CPP_OPTIONS +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures resolv 0.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/resolv] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of resolv 0.0:";; + esac + cat <<\_ACEOF + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +resolv configure 0.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## -------------------------- ## +## Report this to hvr@gnu.org ## +## -------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by resolv $as_me 0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_config_headers="$ac_config_headers cbits/hs_resolv_config.h" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in netinet/in.h arpa/nameser.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" " +#include +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif +#include + +" +if test "x$ac_cv_header_resolv_h" = xyes; then : + +else + as_fn_error $? "required header not found" "$LINENO" 5 +fi + + + +ac_fn_c_check_decl "$LINENO" "res_query" "ac_cv_have_decl_res_query" " +#include +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif +#include + +" +if test "x$ac_cv_have_decl_res_query" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RES_QUERY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "res_nquery" "ac_cv_have_decl_res_nquery" " +#include +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif +#include + +" +if test "x$ac_cv_have_decl_res_nquery" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RES_NQUERY $ac_have_decl +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5 +$as_echo_n "checking for library containing res_query... " >&6; } +if ${ac_cv_search_res_query+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif +#include + +int +main () +{ +res_query(0,0,0,0,0) + ; + return 0; +} +_ACEOF +for ac_lib in '' resolv bind; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_res_query=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_res_query+:} false; then : + break +fi +done +if ${ac_cv_search_res_query+:} false; then : + +else + ac_cv_search_res_query=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5 +$as_echo "$ac_cv_search_res_query" >&6; } +ac_res=$ac_cv_search_res_query +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + EXTRA_LIBS="$EXTRA_LIBS $ac_lib" +else + +as_fn_error $? "could not figure out which C library contains res_query(3)" "$LINENO" 5 + +fi + + + + +USE_RES_NQUERY=0 + +if test "x$ac_cv_have_decl_res_nquery" = xyes; then + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct __res_state" >&5 +$as_echo_n "checking size of struct __res_state... " >&6; } +if ${ac_cv_sizeof_struct___res_state+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct __res_state))" "ac_cv_sizeof_struct___res_state" " +#include +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif +#include + +"; then : + +else + if test "$ac_cv_type_struct___res_state" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct __res_state) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct___res_state=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct___res_state" >&5 +$as_echo "$ac_cv_sizeof_struct___res_state" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT___RES_STATE $ac_cv_sizeof_struct___res_state +_ACEOF + + + +SIZEOF_RES_STATE="$ac_cv_sizeof_struct___res_state" + +if test "$SIZEOF_RES_STATE" -gt 0; then + +USE_RES_NQUERY=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_nquery" >&5 +$as_echo_n "checking for library containing res_nquery... " >&6; } +if ${ac_cv_search_res_nquery+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#endif +#include + +int +main () +{ +res_nquery(0,0,0,0,0,0) + ; + return 0; +} +_ACEOF +for ac_lib in '' resolv bind; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_res_nquery=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_res_nquery+:} false; then : + break +fi +done +if ${ac_cv_search_res_nquery+:} false; then : + +else + ac_cv_search_res_nquery=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_nquery" >&5 +$as_echo "$ac_cv_search_res_nquery" >&6; } +ac_res=$ac_cv_search_res_nquery +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + EXTRA_LIBS="$EXTRA_LIBS $ac_lib" +else + +USE_RES_NQUERY=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not figure out which C library contains res_nquery(3)" >&5 +$as_echo "$as_me: WARNING: could not figure out which C library contains res_nquery(3)" >&2;} + +fi + + +else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine sizeof(struct __res_state)" >&5 +$as_echo "$as_me: WARNING: could not determine sizeof(struct __res_state)" >&2;} + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which DNS api to use" >&5 +$as_echo_n "checking which DNS api to use... " >&6; } + +case "x$USE_RES_NQUERY" in + x0) { $as_echo "$as_me:${as_lineno-$LINENO}: result: res_query(3)" >&5 +$as_echo "res_query(3)" >&6; } + CPP_OPTIONS="-DUSE_RES_NQUERY=0 -DSIZEOF_RES_STATE=0" + ;; + x1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: res_nquery(3)" >&5 +$as_echo "res_nquery(3)" >&6; } + CPP_OPTIONS="-DUSE_RES_NQUERY=1 -DSIZEOF_RES_STATE=$SIZEOF_RES_STATE" + ;; + *) as_fn_error $? "no suitable DNS API detected" "$LINENO" 5 + ;; +esac + +cat >>confdefs.h <<_ACEOF +#define USE_RES_NQUERY $USE_RES_NQUERY +_ACEOF + + + + +ac_config_files="$ac_config_files resolv.buildinfo" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by resolv $as_me 0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +resolv config.status 0.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "cbits/hs_resolv_config.h") CONFIG_HEADERS="$CONFIG_HEADERS cbits/hs_resolv_config.h" ;; + "resolv.buildinfo") CONFIG_FILES="$CONFIG_FILES resolv.buildinfo" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/LICENSE cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/LICENSE --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/LICENSE 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,22 @@ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License (a copy +is included as `LICENSE.GPLv2`), or (at your option) any later +version. + +As a special exception, the copyright holders of this library give you +permission to link this library with the independent modules that +constitute the +package and its dependencies for the purpose of producing the `cabal` +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting `cabal` executable +under terms of your choice, provided that you also meet, for each +linked independent module, the terms and conditions of the license of +that module. An independent module is a module which is not derived +from or based on this library. If you modify this library, you may +extend this exception to your version of the library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. + +The aforementioned special exception applies (at your option) +retroactively to all prior releases of this library. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/LICENSE.GPLv2 cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/LICENSE.GPLv2 --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/LICENSE.GPLv2 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/LICENSE.GPLv2 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/LICENSE.GPLv3 cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/LICENSE.GPLv3 --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/LICENSE.GPLv3 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/LICENSE.GPLv3 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/resolv.buildinfo.in cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/resolv.buildinfo.in --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/resolv.buildinfo.in 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/resolv.buildinfo.in 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,2 @@ +extra-libraries: @EXTRA_LIBS@ +cpp-options: @CPP_OPTIONS@ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/resolv.cabal cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/resolv.cabal --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/resolv.cabal 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/resolv.cabal 2018-11-27 22:50:12.000000000 +0000 @@ -0,0 +1,108 @@ +cabal-version: 1.12 + +name: resolv +version: 0.1.1.2 + +synopsis: Domain Name Service (DNS) lookup via the libresolv standard library routines +description: { + +This package implements an API for accessing +the [Domain Name Service (DNS)](https://tools.ietf.org/html/rfc1035) +resolver service via the standard @libresolv@ system library (whose +API is often available directly via the standard @libc@ C library) on +Unix systems. +. +This package also includes support for decoding message record types +as defined in the following RFCs: +. +- [RFC 1035](https://tools.ietf.org/html/rfc1035): Domain Names - Implementation And Specification +- [RFC 1183](https://tools.ietf.org/html/rfc1183): New DNS RR Definitions +- [RFC 2782](https://tools.ietf.org/html/rfc2782): A DNS RR for specifying the location of services (DNS SRV) +- [RFC 2915](https://tools.ietf.org/html/rfc2915): The Naming Authority Pointer (NAPTR) DNS Resource Record +- [RFC 3596](https://tools.ietf.org/html/rfc3596): DNS Extensions to Support IP Version 6 +- [RFC 4034](https://tools.ietf.org/html/rfc4034): Resource Records for the DNS Security Extensions +- [RFC 4255](https://tools.ietf.org/html/rfc4255): Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints +- [RFC 4408](https://tools.ietf.org/html/rfc4408): Sender Policy Framework (SPF) for Authorizing Use of Domains in E-Mail, Version 1 +- [RFC 5155](https://tools.ietf.org/html/rfc5155): DNS Security (DNSSEC) Hashed Authenticated Denial of Existence +- [RFC 6844](https://tools.ietf.org/html/rfc6844): DNS Certification Authority Authorization (CAA) Resource Record +- [RFC 6891](https://tools.ietf.org/html/rfc6891): Extension Mechanisms for DNS (EDNS(0)) +- [RFC 7553](https://tools.ietf.org/html/rfc7553): The Uniform Resource Identifier (URI) DNS Resource Record +. +For Windows, the package [windns](https://hackage.haskell.org/package/windns) +provides a compatible subset of this package's API. +} + +X-SPDX-License-Identifier: GPL-2.0-or-later +license: GPL-2 +license-files: LICENSE LICENSE.GPLv2 LICENSE.GPLv3 +author: Herbert Valerio Riedel +maintainer: hvr@gnu.org +category: Network +build-type: Configure +bug-reports: https://github.com/hvr/resolv/issues +extra-source-files: ChangeLog.md + +extra-source-files: cbits/hs_resolv.h + cbits/hs_resolv_config.h.in + testdata/msg/*.bin + testdata/msg/*.show + resolv.buildinfo.in + configure + +extra-tmp-files: autom4te.cache + config.log + config.status + resolv.buildinfo + cbits/hs_resolv_config.h + +tested-with: GHC==8.6.2, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.10.1, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 + +source-repository head + type: git + location: https://github.com/hvr/resolv.git + +library + default-language: Haskell2010 + other-extensions: BangPatterns + CApiFFI + CPP + DeriveDataTypeable + DeriveFoldable + DeriveFunctor + DeriveTraversable + GeneralizedNewtypeDeriving + OverloadedStrings + RecordWildCards + Trustworthy + + hs-source-dirs: src + exposed-modules: Network.DNS + other-modules: Network.DNS.Message + Network.DNS.FFI + Compat + + build-depends: base >= 4.5 && <4.13 + , base16-bytestring == 0.1.* + , binary >= 0.7.3 && < 0.9 + , bytestring >= 0.9.2 && < 0.11 + , containers >= 0.4.2.1 && < 0.7 + + ghc-options: -Wall + include-dirs: cbits + +test-suite resolv. + default-language: Haskell2010 + hs-source-dirs: src-test + main-is: Tests1.hs + type: exitcode-stdio-1.0 + + -- dependencies whose version constraints are inherited via lib:resolv component + build-depends: resolv + , base + , bytestring + + -- additional dependencies not inherited + build-depends: tasty >= 1.1 && < 1.2 + , tasty-hunit >= 0.10 && < 0.11 + , directory >= 1.1.0.2 && < 1.4 + , filepath >= 1.3.0 && < 1.5 diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/Setup.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/Setup.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/Setup.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/Setup.hs 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMainWithHooks autoconfUserHooks diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Compat.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Compat.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Compat.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Compat.hs 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,61 @@ +{-# LANGUAGE CPP #-} + +-- | +-- Copyright: © 2017 Herbert Valerio Riedel +-- SPDX-License-Identifier: GPL-2.0-or-later +module Compat + ( toStrict + , fromStrict + , guard + , replicateM + , unless + , when + , A.Applicative(..) + , (<$>) + , Mon.Monoid(..) + , Foldable + , F.forM_ + , toList + , traverse + , T.Traversable + , module Data.Word + , module Data.Int + , module Data.Maybe + , putInt32be + , getInt32be + ) where + +--import qualified Data.ByteString.Lazy as BSL + +import Control.Applicative as A +import Control.Monad as M +import Data.Binary.Get +import Data.Binary.Put +#if MIN_VERSION_bytestring(0,10,0) +import Data.ByteString.Lazy (fromStrict, toStrict) +#else +import qualified Data.ByteString as BS +import qualified Data.ByteString.Lazy as BS.L +#endif +import Data.Foldable as F +import Data.Int +import Data.Maybe +import Data.Monoid as Mon (Monoid (..)) +import Data.Traversable as T +import Data.Word + +#if !(MIN_VERSION_bytestring(0,10,0)) +fromStrict :: BS.ByteString -> BS.L.ByteString +fromStrict = BS.L.fromChunks . (:[]) + +toStrict :: BS.L.ByteString -> BS.ByteString +toStrict = mconcat . BS.L.toChunks +#endif + +#if !MIN_VERSION_binary(0,8,1) +putInt32be :: Int32 -> Put +putInt32be x = putWord32be (fromIntegral x) + +getInt32be :: Get Int32 +getInt32be = fromIntegral <$> getWord32be +#endif diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Network/DNS/FFI.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Network/DNS/FFI.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Network/DNS/FFI.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Network/DNS/FFI.hs 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,70 @@ +{-# LANGUAGE CApiFFI #-} +{-# LANGUAGE CPP #-} + +module Network.DNS.FFI where + +import Control.Concurrent.MVar +import Foreign.C +import Foreign.Marshal.Alloc +import Foreign.Ptr +import System.IO.Unsafe (unsafePerformIO) + +#if !defined(USE_RES_NQUERY) +# error USE_RES_NQUERY not defined +#endif + +{-# INLINE resIsReentrant #-} +-- | Whether the reentrant DNS resolver C API (e.g. @res_nquery(3)@, @res_nsend(3)@) is being used. +-- +-- If this this 'False', then as a fall-back +-- @res_query(3)@/@res_send(3)@ are used, protected by a global mutex. +-- +-- @since 0.1.1.0 +resIsReentrant :: Bool +#if USE_RES_NQUERY +resIsReentrant = True +#else +resIsReentrant = False +#endif + +#if !defined(SIZEOF_RES_STATE) +# error SIZEOF_RES_STATE not defined +#endif + +#if USE_RES_NQUERY && (SIZEOF_RES_STATE <= 0) +# error broken invariant +#endif + +{-# INLINE sizeOfResState #-} +sizeOfResState :: CSize +sizeOfResState = SIZEOF_RES_STATE + +data CResState + +{-# NOINLINE resolvLock #-} +resolvLock :: MVar () +resolvLock = unsafePerformIO $ newMVar () + +withCResState :: (Ptr CResState -> IO a) -> IO a +withCResState act + | resIsReentrant = allocaBytes (fromIntegral sizeOfResState) $ \ptr -> do + _ <- c_memset ptr 0 sizeOfResState + act ptr + | otherwise = withMVar resolvLock $ \() -> act nullPtr + + +-- void *memset(void *s, int c, size_t n); +foreign import capi unsafe "string.h memset" c_memset :: Ptr a -> CInt -> CSize -> IO (Ptr a) + +-- int res_query(void *, const char *dname, int class, int type, unsigned char *answer, int anslen); +foreign import capi safe "hs_resolv.h hs_res_query" c_res_query :: Ptr CResState -> CString -> CInt -> CInt -> Ptr CChar -> CInt -> IO CInt + +-- int res_send(void *, const unsigned char *msg, int msglen, unsigned char *answer, int anslen); +foreign import capi safe "hs_resolv.h hs_res_send" c_res_send :: Ptr CResState -> Ptr CChar -> CInt -> Ptr CChar -> CInt -> IO CInt + +-- int res_opt_set_use_dnssec(void *); +foreign import capi safe "hs_resolv.h res_opt_set_use_dnssec" c_res_opt_set_use_dnssec :: Ptr CResState -> IO CInt + +-- int hs_res_mkquery(void *, const char *dname, int class, int type, unsigned char *req, int reqlen0); +foreign import capi safe "hs_resolv.h hs_res_mkquery" c_res_mkquery :: Ptr CResState -> CString -> CInt -> CInt -> Ptr CChar -> CInt -> IO CInt + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Network/DNS/Message.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Network/DNS/Message.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Network/DNS/Message.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Network/DNS/Message.hs 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,1069 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CApiFFI #-} +{-# LANGUAGE DeriveFoldable #-} +{-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +-- | +-- Copyright: © 2017 Herbert Valerio Riedel +-- SPDX-License-Identifier: GPL-2.0-or-later +-- +-- Internal module +module Network.DNS.Message where + +import qualified Data.ByteString.Base16 as B16 + +import qualified Data.ByteString as BS +import qualified Data.ByteString.Lazy as BSL +import Data.Function +import Data.List (groupBy) +import Data.String +import Numeric (showHex) +import Prelude + +import Data.Binary +import Data.Binary.Get +import Data.Binary.Put +import Data.Bits +import Data.Map (Map) +import qualified Data.Map as Map +import Data.Set (Set) +import qualified Data.Set as Set + +import Compat + +-- | An IPv6 address +-- +-- The IP address is represented in network order, +-- i.e. @2606:2800:220:1:248:1893:25c8:1946@ is +-- represented as @(IPv6 0x2606280002200001 0x248189325c81946)@. +data IPv6 = IPv6 !Word64 !Word64 + deriving (Eq,Ord,Read) + +instance Show IPv6 where + showsPrec p (IPv6 hi lo) = showParen (p >= 11) (showString "IPv6 0x" . showHex hi . showString " 0x" . showHex lo) + +instance Binary IPv6 where + put (IPv6 hi lo) = putWord64be hi >> putWord64be lo + get = IPv6 <$> getWord64be <*> getWord64be + +-- | An IPv4 address +-- +-- The IP address is represented in network order, i.e. @127.0.0.1@ is +-- represented as @(IPv4 0x7f000001)@. +data IPv4 = IPv4 !Word32 + deriving (Eq,Ord,Read) + +instance Show IPv4 where + showsPrec p (IPv4 n) = showParen (p >= 11) (showString "IPv4 0x" . showHex n) + +instance Binary IPv4 where + put (IPv4 w) = putWord32be w + get = IPv4 <$> getWord32be + +-- | @\@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3). +-- +-- A domain-name represented as a series of labels separated by dots. +-- +-- See also 'Labels' for list-based representation. +-- +-- __NOTE__: The 'Labels' type is able to properly represent domain +-- names whose components contain dots which the 'Name' representation +-- cannot. +newtype Name = Name BS.ByteString + deriving (Read,Show,Eq,Ord) + +-- | @\@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3). +-- +-- A sequence of up to 255 octets +-- +-- The limit of 255 octets is caused by the encoding which uses by a +-- prefixed octet denoting the length. +newtype CharStr = CharStr BS.ByteString + deriving (Eq,Ord,IsString) + +instance Show CharStr where + showsPrec p (CharStr bs) = showsPrec p bs + +instance Read CharStr where + readsPrec p = map (\(x,y) -> (CharStr x,y)) <$> readsPrec p + +instance Binary CharStr where + put (CharStr bs) + | BS.length bs > 0xff = fail "putString: string too long" + | otherwise = do + putWord8 (fromIntegral $ BS.length bs) + putByteString bs + get = do + len' <- getWord8 + CharStr <$> getByteString (fromIntegral len') + +{- Resource records + + -- https://en.wikipedia.org/wiki/List_of_DNS_record_types + + RFC 1035 + + A 1 a host address + NS 2 an authoritative name server + CNAME 5 the canonical name for an alias + SOA 6 marks the start of a zone of authority + PTR 12 a domain name pointer + MX 15 mail exchange + TXT 16 text strings + + RFC 3596 + + AAAA 28 IPv6 + + RFC 2782 + + SRV 33 Location of services + + ---- + + RFC3597 Handling of Unknown DNS Resource Record (RR) Types + +-} + +-- | Represents a DNS message as per [RFC 1035](https://tools.ietf.org/html/rfc1035) +data Msg l + = Msg + { msgHeader :: !MsgHeader + , msgQD :: [MsgQuestion l] + , msgAN, msgNS, msgAR :: [MsgRR l] + } deriving (Read,Show,Functor,Foldable,Traversable) + +-- | DNS message header section as per [RFC 1035, section 4.1.1](https://tools.ietf.org/html/rfc1035#section-4.1.1) +data MsgHeader + = MsgHeader + { mhId :: !Word16 + + , mhFlags :: !MsgHeaderFlags + + , mhQDCount :: !Word16 + , mhANCount :: !Word16 + , mhNSCount :: !Word16 + , mhARCount :: !Word16 + } deriving (Read,Show) + +-- | DNS message header section as per [RFC 1035, section 4.1.2](https://tools.ietf.org/html/rfc1035#section-4.1.2) +data MsgQuestion l + = MsgQuestion !l !Type !Class + deriving (Eq,Read,Show,Functor,Foldable,Traversable) + +-- | DNS message header flags as per [RFC 1035, section 4.1.1](https://tools.ietf.org/html/rfc1035#section-4.1.1) +data MsgHeaderFlags + = MsgHeaderFlags + { mhQR :: !QR + , mhOpcode :: !Word8 -- actually Word4 + , mhAA :: !Bool + , mhTC :: !Bool + , mhRD :: !Bool + , mhRA :: !Bool + , mhZ :: !Bool -- reserved/unused bit + , mhAD :: !Bool -- RFC4035 + , mhCD :: !Bool -- RFC4035 + , mhRCode :: !Word8 -- Word4 + } deriving (Read,Show) + +-- | DNS resource record section as per [RFC 1035, section 4.1.3](https://tools.ietf.org/html/rfc1035#section-4.1.3) +data MsgRR l + = MsgRR + { rrName :: !l + , rrClass :: !Class + , rrTTL :: !TTL + , rrData :: !(RData l) + } deriving (Eq,Read,Show,Functor,Foldable,Traversable) + +-- | DNS resource record data (see also 'MsgRR' and 'TypeSym') +data RData l + = RDataA !IPv4 + | RDataAAAA !IPv6 + | RDataCNAME !l + | RDataPTR !l + | RDataHINFO !CharStr !CharStr + | RDataNS !l + | RDataMX !Word16 !l + | RDataTXT ![CharStr] + | RDataSPF ![CharStr] + | RDataSOA !l !l !Word32 !Word32 !Word32 !Word32 !Word32 + | RDataSRV !(SRV l) + + -- RFC 1183 + | RDataAFSDB !Word16 !l + + -- RFC 2915 + | RDataNAPTR !Word16 !Word16 !CharStr !CharStr !CharStr !l + + -- RFC 7553 + | RDataURI !Word16 !Word16 !BS.ByteString + + -- RFC 4034 + | RDataRRSIG !Word16 !Word8 !Word8 !Word32 !Word32 !Word32 !Word16 !l !BS.ByteString + | RDataDNSKEY !Word16 !Word8 !Word8 !BS.ByteString + | RDataDS !Word16 !Word8 !Word8 !BS.ByteString + | RDataNSEC !l !(Set Type) + + -- RFC 4255 + | RDataSSHFP !Word8 !Word8 !BS.ByteString + + -- RFC 5155 + | RDataNSEC3PARAM !Word8 !Word8 !Word16 !CharStr + | RDataNSEC3 !Word8 !Word8 !Word16 !CharStr !CharStr !(Set Type) + + -- RFC 6844 + | RDataCAA !Word8 !CharStr !BS.ByteString + + -- pseudo-record + | RDataOPT !BS.ByteString -- FIXME + + -- unknown/unsupported + | RData !Type !BS.ByteString -- ^ Unknown/undecoded resource record type + deriving (Eq,Read,Show,Functor,Foldable,Traversable) + + +-- | @SRV@ Record data as per [RFC 2782](https://tools.ietf.org/html/rfc2782) +data SRV l = SRV { srvPriority :: !Word16 + , srvWeight :: !Word16 + , srvPort :: !Word16 + , srvTarget :: !l + } deriving (Eq,Read,Show,Functor,Foldable,Traversable) + +---------------------------------------------------------------------------- + +decodeMessage' :: BS.ByteString -> Maybe (Msg Labels) +decodeMessage' bs = do + (rest, _, v) <- either handleParseFail Just $ + decodeOrFail (fromStrict bs) + + -- don't allow trailing garbage + guard (BSL.null rest) + + let ofss = Set.fromList $ mapMaybe labelsPtr (toList v) + ofsmap <- retrieveLabelPtrs bs ofss + + traverse (resolveLabelPtr ofsmap) v + where + -- handleParseFail _ = Nothing + handleParseFail (rest, n, e) = error $ show (e, n, BSL.length rest, BS.length bs) ++ "\n" ++ show (B16.encode $ toStrict rest) + +-- | Decode a raw DNS message (query or response) +-- +-- Returns 'Nothing' on decoding failures. +decodeMessage :: IsLabels n => BS.ByteString -> Maybe (Msg n) +decodeMessage = fmap (fmap fromLabels) . decodeMessage' + +encodeMessage' :: Msg Labels -> BS.ByteString +encodeMessage' m = toStrict $ encode (fmap labels2labelsPtr m) + +-- | Construct a raw DNS message (query or response) +-- +-- May return 'Nothing' in input parameters are detected to be invalid. +encodeMessage :: IsLabels n => Msg n -> Maybe BS.ByteString +encodeMessage m = encodeMessage' <$> traverse toLabels m + + +instance Binary l => Binary (Msg l) where + get = do + hdr@MsgHeader{..} <- get + + Msg hdr <$> replicateM (fromIntegral mhQDCount) get + <*> replicateM (fromIntegral mhANCount) get + <*> replicateM (fromIntegral mhNSCount) get + <*> replicateM (fromIntegral mhARCount) get + + put (Msg hdr qds ans nss ars) = do + put hdr + mapM_ put qds + mapM_ put ans + mapM_ put nss + mapM_ put ars + +instance Binary MsgHeader where + get = MsgHeader <$> getWord16be + <*> get + <*> getWord16be + <*> getWord16be + <*> getWord16be + <*> getWord16be + + put (MsgHeader{..}) = do + putWord16be mhId + put mhFlags + putWord16be mhQDCount + putWord16be mhANCount + putWord16be mhNSCount + putWord16be mhARCount + +instance Binary MsgHeaderFlags where + put = putWord16be . encodeFlags + get = decodeFlags <$> getWord16be + +-- | Decode message header flag field +-- +-- > +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +-- > |QR| Opcode |AA|TC|RD|RA|??|AD|CD| RCODE | +-- > +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +-- +decodeFlags :: Word16 -> MsgHeaderFlags +decodeFlags w = MsgHeaderFlags{..} + where + mhQR = if testBit w 15 then IsResponse else IsQuery + mhOpcode = shiftR' 11 .&. 0xf + mhAA = testBit w 10 + mhTC = testBit w 9 + mhRD = testBit w 8 + mhRA = testBit w 7 + mhZ = testBit w 6 + mhAD = testBit w 5 + mhCD = testBit w 4 + mhRCode = fromIntegral w .&. 0xf + + shiftR' = fromIntegral . shiftR w + +encodeFlags :: MsgHeaderFlags -> Word16 +encodeFlags MsgHeaderFlags{..} = + (case mhQR of + IsResponse -> bit 15 + IsQuery -> 0) .|. + (fromIntegral mhOpcode `shiftL` 11) .|. + (if mhAA then bit 10 else 0) .|. + (if mhTC then bit 9 else 0) .|. + (if mhRD then bit 8 else 0) .|. + (if mhRA then bit 7 else 0) .|. + (if mhZ then bit 6 else 0) .|. + (if mhAD then bit 5 else 0) .|. + (if mhCD then bit 4 else 0) .|. + (fromIntegral mhRCode) + +-- | Encodes whether message is a query or a response +-- +-- @since 0.1.1.0 +data QR = IsQuery | IsResponse + deriving (Eq,Read,Show) + +---------------------------------------------------------------------------- + +infixr 5 :.: + +-- | A DNS Label +-- +-- Must be non-empty and at most 63 octets. +type Label = BS.ByteString + +-- | A @@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3) expressed as list of 'Label's. +-- +-- See also 'Name' +data Labels = !Label :.: !Labels | Root + deriving (Read,Show,Eq,Ord) + +labelsToList :: Labels -> [Label] +labelsToList (x :.: xs) = x : labelsToList xs +labelsToList Root = [""] + +-- | Types that represent @@ as per [RFC 1035, section 3.3](https://tools.ietf.org/html/rfc1035#section-3.3) and can be converted to and from 'Labels'. +class IsLabels s where + toLabels :: s -> Maybe Labels + fromLabels :: Labels -> s + +instance IsLabels Labels where + fromLabels = id + + toLabels ls + | all isLabelValid (init (labelsToList ls)) = Just ls + | otherwise = Nothing + where + isLabelValid l = not (BS.null l) && BS.length l < 0x40 + +instance IsLabels Name where + fromLabels = labels2name + toLabels = name2labels + +toName :: IsLabels n => n -> Maybe Name +toName = fmap fromLabels . toLabels + +name2labels :: Name -> Maybe Labels +name2labels (Name n) + | all (\l -> not (BS.null l) && BS.length l < 0x40) n' = Just $! foldr (:.:) Root n' + | otherwise = Nothing + where + n' | BS.isSuffixOf "." n = BS.split 0x2e (BS.init n) + | otherwise = BS.split 0x2e n + +labels2name :: Labels -> Name +labels2name Root = Name "." +labels2name ls = Name (BS.intercalate "." $ labelsToList ls) + +-- | IOW, a domain-name +-- +-- May contain pointers +-- +-- Can be resolved into a 'Labels' without label ptrs. +data LabelsPtr = Label !Label !LabelsPtr -- ^ See RC2181: a label must be between 1-63 octets; can be arbitrary binary data + | LPtr !Word16 + | LNul + deriving (Eq,Read,Show) + +labels2labelsPtr :: Labels -> LabelsPtr +labels2labelsPtr Root = LNul +labels2labelsPtr (l :.: rest) = Label l (labels2labelsPtr rest) + +instance Binary LabelsPtr where + get = go [] + where + go acc = do + l0 <- getLabel + case l0 of + Right bs | BS.null bs -> pure (foldr Label LNul $ reverse acc) + | otherwise -> go (bs:acc) + Left ofs -> pure (foldr Label (LPtr ofs) $ reverse acc) + + getLabel :: Get (Either Word16 BS.ByteString) + getLabel = do + len <- getWord8 + + if len >= 0x40 + then do + when (len .&. 0xc0 /= 0xc0) $ fail ("invalid length octet " ++ show len) + ofs <- fromIntegral <$> getWord8 + pure $ Left $ (fromIntegral (len .&. 0x3f) `shiftL` 8) .|. ofs + else Right <$> getByteString (fromIntegral len) + + put LNul = putWord8 0 + put (Label l next) + | BS.length l < 1 || BS.length l >= 0x40 = error "put (Label {}): invalid label size" + | otherwise = do + putWord8 (fromIntegral (BS.length l)) + putByteString l + put next + put (LPtr ofs) + | ofs < 0x4000 = putWord16be (0xc000 .|. ofs) + | otherwise = error "put (LPtr {}): invalid offset" + +-- | Compute serialised size of 'LabelsPtr' +labelsSize :: LabelsPtr -> Word16 +labelsSize = fromIntegral . go 0 + where + go n (LPtr _) = n+2 + go n LNul = n+1 + go n (Label bs rest) = go (n + 1 + BS.length bs) rest + +-- | Extract pointer-offset from 'LabelsPtr' (if it exists) +labelsPtr :: LabelsPtr -> Maybe Word16 +labelsPtr (Label _ ls) = labelsPtr ls +labelsPtr LNul = Nothing +labelsPtr (LPtr ofs) = Just ofs + +---------------------------------------------------------------------------- + +instance Binary l => Binary (MsgQuestion l) where + get = MsgQuestion <$> get <*> get <*> get + put (MsgQuestion l qt cls) = put l >> put qt >> put cls + + +instance Binary l => Binary (MsgRR l) where + get = do + rrName <- get + rrType <- get + rrClass <- get + rrTTL <- get + rrData <- getRData rrType + pure (MsgRR {..}) + + put (MsgRR{..}) = do + put rrName + put (either id typeFromSym $ rdType rrData) + put rrClass + put rrTTL + putRData rrData + +getRData :: Binary l => Type -> Get (RData l) +getRData qt = do + len <- fromIntegral <$> getWord16be + + let unknownRdata = RData qt <$> getByteString len + + getByteStringRest = consumeRestWith getByteString + + consumeRestWith act = do + curofs <- fromIntegral <$> bytesRead + act (len - curofs) + + isolate len $ + case typeToSym qt of + Nothing -> unknownRdata + Just ts -> case ts of + TypeA -> RDataA <$> get + + TypeAFSDB -> RDataAFSDB <$> getWord16be + <*> get + + TypeNS -> RDataNS <$> get + + TypeCNAME -> RDataCNAME <$> get + + TypeSOA -> RDataSOA <$> get + <*> get + <*> getWord32be + <*> getWord32be + <*> getWord32be + <*> getWord32be + <*> getWord32be + + TypePTR -> RDataPTR <$> get + + TypeHINFO -> RDataHINFO <$> get + <*> get + + TypeMX -> RDataMX <$> getWord16be + <*> get + + TypeTXT -> RDataTXT <$> getUntilEmpty + TypeSPF -> RDataSPF <$> getUntilEmpty + + TypeAAAA -> RDataAAAA <$> get + + TypeSRV -> RDataSRV <$> get + + TypeNAPTR -> RDataNAPTR <$> getWord16be -- order + <*> getWord16be --preference + <*> get -- flags + <*> get -- services + <*> get -- regexp + <*> get -- replacement + + TypeRRSIG -> RDataRRSIG <$> getWord16be + <*> getWord8 + <*> getWord8 + <*> getWord32be + <*> getWord32be + <*> getWord32be + <*> getWord16be + <*> get -- uncompressed + <*> getByteStringRest + + TypeDNSKEY -> RDataDNSKEY <$> getWord16be + <*> getWord8 + <*> getWord8 + <*> getByteString (len - 4) + + TypeDS -> RDataDS <$> getWord16be + <*> getWord8 + <*> getWord8 + <*> getByteString (len - 4) + + TypeNSEC -> RDataNSEC <$> get + <*> decodeNsecTypeMap + + TypeURI -> RDataURI <$> getWord16be -- prio + <*> getWord16be -- weight + <*> getByteString (len - 4) + + TypeSSHFP -> RDataSSHFP <$> getWord8 + <*> getWord8 + <*> getByteString (len - 2) + + TypeNSEC3PARAM -> RDataNSEC3PARAM <$> getWord8 + <*> getWord8 + <*> getWord16be + <*> get -- salt + + TypeNSEC3 -> RDataNSEC3 <$> getWord8 + <*> getWord8 + <*> getWord16be + <*> get -- salt + <*> get -- next hashed owner name + <*> decodeNsecTypeMap + + TypeCAA -> RDataCAA <$> getWord8 -- flags + <*> get -- tag -- TODO: must be non-empty + <*> getByteStringRest + + TypeOPT -> RDataOPT <$> getByteString len -- FIXME + + TypeANY -> unknownRdata -- shouldn't happen + +putRData :: Binary l => RData l -> Put +putRData rd = do + let rdata = runPut (putRData' rd) + rdataLen = BSL.length rdata + + unless (rdataLen < 0x10000) $ + fail "rdata too large" + + putWord16be (fromIntegral rdataLen) + putLazyByteString rdata + +putRData' :: Binary l => RData l -> Put +putRData' rd = case rd of + RDataA ip4 -> put ip4 + RDataAAAA ip6 -> put ip6 + RDataCNAME cname -> put cname + RDataOPT d -> putByteString d + RDataMX prio l -> putWord16be prio >> put l + RDataSOA l1 l2 w1 w2 w3 w4 w5 -> do + put l1 + put l2 + putWord32be w1 + putWord32be w2 + putWord32be w3 + putWord32be w4 + putWord32be w5 + + RDataPTR l -> put l + RDataNS l -> put l + RDataTXT ss -> mapM_ put ss + RDataSPF ss -> mapM_ put ss + RDataSRV srv -> put srv + + RDataAFSDB w l -> putWord16be w >> put l + + RDataHINFO s1 s2 -> put s1 >> put s2 + + RDataRRSIG w1 w2 w3 w4 w5 w6 w7 l s -> do + putWord16be w1 + putWord8 w2 + putWord8 w3 + putWord32be w4 + putWord32be w5 + putWord32be w6 + putWord16be w7 + put l + putByteString s + + RDataDNSKEY w1 w2 w3 s -> do + putWord16be w1 + putWord8 w2 + putWord8 w3 + putByteString s + + RDataNSEC3PARAM w1 w2 w3 s -> do + putWord8 w1 + putWord8 w2 + putWord16be w3 + put s + + RDataNSEC3 w1 w2 w3 s1 s2 tm -> do + putWord8 w1 + putWord8 w2 + putWord16be w3 + put s1 + put s2 + encodeNsecTypeMap tm + + RDataCAA fl s1 s2 -> do + putWord8 fl + put s1 + putByteString s2 + + RDataURI w1 w2 s -> do + putWord16be w1 + putWord16be w2 + putByteString s + + RDataDS w1 w2 w3 s -> do + putWord16be w1 + putWord8 w2 + putWord8 w3 + putByteString s + + RDataNSEC l tm -> do + put l + encodeNsecTypeMap tm + + RDataNAPTR w1 w2 s1 s2 s3 l -> do + putWord16be w1 + putWord16be w2 + put s1 + put s2 + put s3 + put l + + RDataSSHFP w1 w2 s -> do + putWord8 w1 + putWord8 w2 + putByteString s + + RData _ raw -> putByteString raw + + -- _ -> error ("putRData: " ++ show rd) + + +instance Binary l => Binary (SRV l) where + get = SRV <$> getWord16be + <*> getWord16be + <*> getWord16be + <*> get + + put (SRV w1 w2 w3 l) = do + putWord16be w1 + putWord16be w2 + putWord16be w3 + put l + +{- NSEC type-bitmap example: + + A NS SOA TXT AAAA RRSIG NSEC DNSKEY + +'00 07 62 00 80 08 00 03 80' +'00000000 00000111 01100010 00000000 10000000 00001000 00000000 00000011 10000000' + Win=#0 len=7 ^{SOA} ^{TXT} ^{AAAA} ^{DNSKEY} + ^^{A,NS} ^^{RRSIG,NSEC} +-} + +decodeNsecTypeMap :: Get (Set Type) +decodeNsecTypeMap = do + r <- concat <$> untilEmptyWith decode1 + -- TODO: enforce uniqueness + pure (Set.fromList r) + where + -- decode single window + decode1 = do + wi <- getWord8 + l <- getWord8 + unless (0 < l && l <= 32) $ + fail "invalid bitmap length" + + bmap <- getByteString (fromIntegral l) + + let winofs = (fromIntegral wi)*0x100 :: Int + lst = [ Type (fromIntegral (winofs+j*8+7-i)) + | (j,x) <- zip [0..] (BS.unpack bmap) + , i <- [7,6..0] + , testBit x i ] + + pure lst + +encodeNsecTypeMap :: Set Type -> Put +encodeNsecTypeMap bmap = do + when (Set.null bmap) $ fail "invalid empty type-map" + -- when (Set.member 0 bmap) $ fail "invalid TYPE0 set in type-map" + -- TODO: verify that Meta-TYPES and QTYPEs aren't contained in bmap + + forM_ (Map.toList bmap') $ \(wi, tm) -> do + putWord8 wi + put (CharStr $ BS.pack tm) + where + bmap' = fmap set2bitmap . splitToBlocks $ Set.map (\(Type w)->w) bmap + +set2bitmap :: Set Word8 -> [Word8] +set2bitmap = go 0 0 . Set.toList + where + go _ acc [] = if acc == 0 then [] else [acc] + go j acc (i:is) + | j' > j = acc : go (j+1) 0 (i:is) + | j' == j = go j' (acc .|. bit (7 - fromIntegral i')) is + | otherwise = error "set2bitmap: the impossible happened" + where + (j',i') = i `quotRem` 8 + +splitToBlocks :: Set Word16 -> Map Word8 (Set Word8) +splitToBlocks js = Map.fromList $ map (\xs -> (fst $ head xs, Set.fromList (map snd xs))) js' + where + hi16 :: Word16 -> Word8 + hi16 = fromIntegral . flip shiftR 8 + + lo16 :: Word16 -> Word8 + lo16 = fromIntegral . (.&. 0xff) + + js' :: [[(Word8,Word8)]] + js' = groupBy ((==) `on` fst) (map ((,) <$> hi16 <*> lo16) (Set.toList js)) + + +-- | Resolves/parses label pointer used for label compressing +-- +-- Returns 'Nothing' on failure +retrieveLabelPtr :: BS.ByteString -> Word16 -> Maybe LabelsPtr +retrieveLabelPtr msg ofs + = case decodeOrFail (fromStrict $ BS.drop (fromIntegral ofs) msg) of + Left _ -> Nothing + Right (_, _, v) -> Just v + +-- | Resolve set of label pointer offsets +-- +-- Invariants (/iff/ result is not 'Nothing') +-- +-- * all requested offsets will be contained in the result map +-- +-- * any offsets contained in the resolved 'Labels' will be part of +-- the result map as well +-- +-- NB: No cycle detection is performed, nor are 'Labels' flattened +retrieveLabelPtrs :: BS.ByteString -> Set Word16 -> Maybe (Map Word16 LabelsPtr) +retrieveLabelPtrs msg ofss0 = go =<< lupPtrs1 ofss0 + where + go :: Map Word16 LabelsPtr -> Maybe (Map Word16 LabelsPtr) + go m0 = do + let missingOfss = Set.fromList (mapMaybe labelsPtr (toList m0)) Set.\\ Map.keysSet m0 + + if Set.null missingOfss + then pure m0 -- fix-point reached + else do + m1 <- lupPtrs1 missingOfss + go (Map.union m0 m1) + + -- single lookup step + lupPtrs1 :: Set Word16 -> Maybe (Map Word16 LabelsPtr) + lupPtrs1 ofss1 = Map.fromList . zip (toList ofss1) <$> traverse (retrieveLabelPtr msg) (toList ofss1) + +-- | Checks for maximum name length (255) and (therefore indirectly) cycle-checking +resolveLabelPtr :: Map Word16 LabelsPtr -> LabelsPtr -> Maybe Labels +resolveLabelPtr ofsmap = go 0 [] + where + go :: Int -> [BS.ByteString] -> LabelsPtr -> Maybe Labels + go !n acc (Label x ls) = go (n+1+BS.length x) (x:acc) ls + go n acc LNul + | n < 255 = Just $! foldr (:.:) Root (reverse acc) + | otherwise = Nothing -- length violation + go n acc (LPtr ofs) + | n < 255 = go n acc =<< lup ofs + | otherwise = Nothing + + lup :: Word16 -> Maybe LabelsPtr + lup ofs = Map.lookup ofs ofsmap + + +{- Resource records + + -- https://en.wikipedia.org/wiki/List_of_DNS_record_types + + RFC 1035 + + A 1 a host address + NS 2 an authoritative name server + CNAME 5 the canonical name for an alias + SOA 6 marks the start of a zone of authority + PTR 12 a domain name pointer + MX 15 mail exchange + TXT 16 text strings + + RFC 3596 + + AAAA 28 IPv6 + + RFC 2782 + + SRV 33 Location of services + + ---- + + RFC3597 Handling of Unknown DNS Resource Record (RR) Types + +-} + +-- | Raw DNS record type code +-- +-- See also 'TypeSym' +newtype Type = Type Word16 + deriving (Eq,Ord,Read,Show) + +instance Binary Type where + put (Type w) = putWord16be w + get = Type <$> getWord16be + +-- | DNS @CLASS@ code as per [RFC 1035, section 3.2.4](https://tools.ietf.org/html/rfc1035#section-3.2.4) +-- +-- The most commonly used value is 'classIN'. +newtype Class = Class Word16 + deriving (Eq,Ord,Read,Show) + +-- | The 'Class' constant for @IN@ (Internet) +classIN :: Class +classIN = Class 1 + +instance Binary Class where + put (Class w) = putWord16be w + get = Class <$> getWord16be + +-- | Cache time-to-live expressed in seconds +newtype TTL = TTL Int32 + deriving (Eq,Ord,Read,Show) + +instance Binary TTL where + put (TTL i) = putInt32be i + get = TTL <$> getInt32be + +-- http://www.bind9.net/dns-parameters + +-- | Symbolic DNS record type +data TypeSym + = TypeA -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeAAAA -- ^ [RFC 3596](https://tools.ietf.org/html/rfc3596) + | TypeAFSDB -- ^ [RFC 1183](https://tools.ietf.org/html/rfc1183) + | TypeANY -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) (query) + | TypeCAA -- ^ [RFC 6844](https://tools.ietf.org/html/rfc6844) + | TypeCNAME -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeDNSKEY -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) + | TypeDS -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) + | TypeHINFO -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeMX -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeNAPTR -- ^ [RFC 2915](https://tools.ietf.org/html/rfc2915) + | TypeNS -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeNSEC -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) + | TypeNSEC3 -- ^ [RFC 5155](https://tools.ietf.org/html/rfc5155) + | TypeNSEC3PARAM -- ^ [RFC 5155](https://tools.ietf.org/html/rfc5155) + | TypeOPT -- ^ [RFC 6891](https://tools.ietf.org/html/rfc6891) (meta) + | TypePTR -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeRRSIG -- ^ [RFC 4034](https://tools.ietf.org/html/rfc4034) + | TypeSOA -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeSPF -- ^ [RFC 4408](https://tools.ietf.org/html/rfc4408) + | TypeSRV -- ^ [RFC 2782](https://tools.ietf.org/html/rfc2782) + | TypeSSHFP -- ^ [RFC 4255](https://tools.ietf.org/html/rfc4255) + | TypeTXT -- ^ [RFC 1035](https://tools.ietf.org/html/rfc1035) + | TypeURI -- ^ [RFC 7553](https://tools.ietf.org/html/rfc7553) + deriving (Eq,Ord,Enum,Bounded,Read,Show) + +-- | Convert symbolic 'TypeSym' to numeric 'Type' code +typeFromSym :: TypeSym -> Type +typeFromSym ts = Type $ case ts of + TypeA -> 1 + TypeNS -> 2 + TypeCNAME -> 5 + TypeSOA -> 6 + TypePTR -> 12 + TypeHINFO -> 13 + TypeMX -> 15 + TypeTXT -> 16 + TypeAFSDB -> 18 + TypeAAAA -> 28 + TypeSRV -> 33 + TypeNAPTR -> 35 + TypeOPT -> 41 + TypeDS -> 43 + TypeSSHFP -> 44 + TypeRRSIG -> 46 + TypeNSEC -> 47 + TypeDNSKEY -> 48 + TypeNSEC3 -> 50 + TypeNSEC3PARAM -> 51 + TypeSPF -> 99 + TypeANY -> 255 + TypeURI -> 256 + TypeCAA -> 257 + +-- | Convert 'Type' code to symbolic 'TypeSym' +typeToSym :: Type -> Maybe TypeSym +typeToSym (Type w) = case w of + 1 -> Just TypeA + 2 -> Just TypeNS + 5 -> Just TypeCNAME + 6 -> Just TypeSOA + 12 -> Just TypePTR + 13 -> Just TypeHINFO + 15 -> Just TypeMX + 16 -> Just TypeTXT + 18 -> Just TypeAFSDB + 28 -> Just TypeAAAA + 33 -> Just TypeSRV + 35 -> Just TypeNAPTR + 41 -> Just TypeOPT + 43 -> Just TypeDS + 44 -> Just TypeSSHFP + 46 -> Just TypeRRSIG + 47 -> Just TypeNSEC + 48 -> Just TypeDNSKEY + 50 -> Just TypeNSEC3 + 51 -> Just TypeNSEC3PARAM + 99 -> Just TypeSPF + 255 -> Just TypeANY + 256 -> Just TypeURI + 257 -> Just TypeCAA + _ -> Nothing + +-- | Extract the resource record type of a 'RData' object +rdType :: RData l -> Either Type TypeSym +rdType rd = case rd of + RDataA {} -> Right TypeA + RDataAAAA {} -> Right TypeAAAA + RDataAFSDB {} -> Right TypeAFSDB + RDataCAA {} -> Right TypeCAA + RDataCNAME {} -> Right TypeCNAME + RDataDNSKEY {} -> Right TypeDNSKEY + RDataDS {} -> Right TypeDS + RDataHINFO {} -> Right TypeHINFO + RDataMX {} -> Right TypeMX + RDataNAPTR {} -> Right TypeNAPTR + RDataNS {} -> Right TypeNS + RDataNSEC {} -> Right TypeNSEC + RDataNSEC3 {} -> Right TypeNSEC3 + RDataNSEC3PARAM {} -> Right TypeNSEC3PARAM + RDataOPT {} -> Right TypeOPT + RDataPTR {} -> Right TypePTR + RDataRRSIG {} -> Right TypeRRSIG + RDataSOA {} -> Right TypeSOA + RDataSRV {} -> Right TypeSRV + RDataTXT {} -> Right TypeTXT + RDataSPF {} -> Right TypeSPF + RDataURI {} -> Right TypeURI + RDataSSHFP {} -> Right TypeSSHFP + -- + RData ty _ -> maybe (Left ty) Right (typeToSym ty) + + +{- TODO: + + +type-bitmap: + + A NS SOA TXT AAAA RRSIG NSEC DNSKEY + +'00 07 62 00 80 08 00 03 80' +'00000000 00000111 01100010 00000000 10000000 00001000 00000000 00000011 10000000' + Win=#0 len=7 ^{SOA} ^{TXT} ^{AAAA} ^{DNSKEY} + ^^{A,NS} ^^{RRSIG,NSEC} + +" ".join(map("{:08b}".format,[0,7,98,0,128,8,0,3,128])) + + +"\NUL\a\"\NUL\NUL\NUL\NUL\ETX\128" NS SOA RRSIG NSEC DNSKEY + +[ (winofs+j*8+7-i) | (j,x) <- zip [0..] xs, i <- [7,6..0], testBit x i ] + +-} + + + +-- helpers + +getUntilEmpty :: Binary a => Get [a] +getUntilEmpty = untilEmptyWith get + +untilEmptyWith :: Get a -> Get [a] +untilEmptyWith g = go [] + where + go acc = do + e <- isEmpty + if e + then pure (reverse acc) + else do + v <- g + go (v : acc) + + + +{- TODO: + + + MsgRR{rrName = Name "stanford.edu.", rrClass = 1, rrTTL = 1799, + rrData = + RData 29 + "\NUL\DC2\SYN\DC3\136\a\244\212e\200\252\194\NUL\152\150\128"}, + + +https://en.wikipedia.org/wiki/LOC_record + + +LOC record statdns.net. IN LOC 52 22 23.000 N 4 53 32.000 E -2.00m 0.00m 10000m 10m + + +SW1A2AA.find.me.uk. 86399 IN LOC 51 30 12.748 N 0 7 39.611 W 0.00m 0.00m 0.00m 0.00m + + +https://tools.ietf.org/html/rfc1876 + +-} + diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Network/DNS.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Network/DNS.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src/Network/DNS.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src/Network/DNS.hs 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,373 @@ +{-# LANGUAGE CApiFFI #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE Trustworthy #-} + +-- | +-- Copyright: © 2017 Herbert Valerio Riedel +-- SPDX-License-Identifier: GPL-2.0-or-later +-- +-- This module implements an API for accessing +-- the [Domain Name Service (DNS)](https://tools.ietf.org/html/rfc1035) +-- resolver service via the standard @libresolv@ system library +-- on Unix systems. +-- +module Network.DNS + ( -- ** High level API + queryA + , queryAAAA + , queryCNAME + , querySRV + , queryTXT + + -- * Mid-level API + , query + , DnsException(..) + + -- * Low-level API + , resIsReentrant + , queryRaw + , sendRaw + , mkQueryRaw + + , decodeMessage + , encodeMessage + , mkQueryMsg + + -- * Types + -- ** Basic types + + -- *** Names/Labels + , Label + , Labels(..) + , IsLabels(..) + + , Name(..) + , caseFoldName + + -- *** Character strings + , CharStr(..) + + -- *** IP addresses + , IPv4(..) + , IPv6(..) + + -- *** RR TTL & Class + , TTL(..) + + , Class(..) + , classIN + + -- *** Message types + , Type(..) + , TypeSym(..) + , typeFromSym + , typeToSym + + -- ** Messages + + , Msg(..) + + , MsgHeader(..) + , MsgHeaderFlags(..), QR(..) + , MsgQuestion(..) + , MsgRR(..) + + , RData(..) + , rdType + + , SRV(..) + ) + where + +import Control.Exception +import Data.Typeable (Typeable) +import Foreign.C +import Foreign.Marshal.Alloc +import Prelude + +import qualified Data.ByteString as BS + +import Compat + +import Network.DNS.FFI +import Network.DNS.Message + +-- | Exception thrown in case of errors while encoding or decoding into a 'Msg'. +-- +-- @since 0.1.1.0 +data DnsException = DnsEncodeException + | DnsDecodeException + deriving (Show, Typeable) + +instance Exception DnsException + +-- | Send a query via @res_query(3)@ and decode its response into a 'Msg' +-- +-- Throws 'DnsException' in case of encoding or decoding errors. May throw other IO exceptions in case of network errors. +-- +-- === Example +-- +-- >>> query classIN (Name "_mirrors.hackage.haskell.org") TypeTXT +-- Just (Msg{msgHeader = MsgHeader{mhId = 56694, +-- mhFlags = MsgHeaderFlags{mhQR = IsResponse, mhOpcode = 0, mhAA = False, +-- mhTC = False, mhRD = True, mhRA = True, mhZ = False, +-- mhAD = False, mhCD = False, mhRCode = 0}, +-- mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, +-- msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 16) (Class 1)], +-- msgAN = [MsgRR{rrName = Name "_mirrors.hackage.haskell.org.", +-- rrClass = Class 1, rrTTL = TTL 299, +-- rrData = RDataTXT ["0.urlbase=http://hackage.fpcomplete.com/", +-- "1.urlbase=http://objects-us-west-1.dream.io/hackage-mirror/"]}], +-- msgNS = [], +-- msgAR = [MsgRR{rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}] +-- }) +-- +query :: IsLabels n => Class -> n -> TypeSym -> IO (Msg n) +query cls name0 qtype + | Just name <- toName name0 = do + bs <- queryRaw cls name (typeFromSym qtype) + msg <- evaluate (decodeMessage bs) + maybe (throwIO DnsDecodeException) pure msg + | otherwise = throwIO DnsEncodeException + +-- | Send a query via @res_query(3)@, the return value is the raw binary response message. +-- +-- You can use 'decodeMessage' to decode the response message. +queryRaw :: Class -> Name -> Type -> IO BS.ByteString +queryRaw (Class cls) (Name name) qtype = withCResState $ \stptr -> do + allocaBytes max_msg_size $ \resptr -> do + _ <- c_memset resptr 0 max_msg_size + BS.useAsCString name $ \dn -> do + + rc1 <- c_res_opt_set_use_dnssec stptr + unless (rc1 == 0) $ + fail "res_init(3) failed" + + resetErrno + reslen <- c_res_query stptr dn (fromIntegral cls) qtypeVal resptr max_msg_size + + unless (reslen <= max_msg_size) $ + fail "res_query(3) message size overflow" + + errno <- getErrno + + when (reslen < 0) $ do + unless (errno == eOK) $ + throwErrno "res_query" + + fail "res_query(3) failed" + + BS.packCStringLen (resptr, fromIntegral reslen) + + where + -- The DNS protocol is inherently 16-bit-offset based; so 64KiB is + -- a reasonable maximum message size most implementations seem to + -- support. + max_msg_size :: Num a => a + max_msg_size = 0x10000 + + qtypeVal :: CInt + qtypeVal = case qtype of Type w -> fromIntegral w + +-- | Send a raw preformatted query via @res_send(3)@. +sendRaw :: BS.ByteString -> IO BS.ByteString +sendRaw req = withCResState $ \stptr -> do + allocaBytes max_msg_size $ \resptr -> do + _ <- c_memset resptr 0 max_msg_size + BS.useAsCStringLen req $ \(reqptr,reqlen) -> do + rc1 <- c_res_opt_set_use_dnssec stptr + unless (rc1 == 0) $ + fail "res_init(3) failed" + + resetErrno + reslen <- c_res_send stptr reqptr (fromIntegral reqlen) resptr max_msg_size + + unless (reslen <= max_msg_size) $ + fail "res_send(3) message size overflow" + + errno <- getErrno + + when (reslen < 0) $ do + unless (errno == eOK) $ + throwErrno "res_send" + + fail "res_send(3) failed" + + BS.packCStringLen (resptr, fromIntegral reslen) + + where + -- The DNS protocol is inherently 16-bit-offset based; so 64KiB is + -- a reasonable maximum message size most implementations seem to + -- support. + max_msg_size :: Num a => a + max_msg_size = 0x10000 + +-- | Construct a DNS query 'Msg' in the style of 'mkQueryRaw' +mkQueryMsg :: IsLabels n => Class -> n -> Type -> Msg n +mkQueryMsg cls l qtype = Msg (MsgHeader{..}) + [MsgQuestion l qtype cls] + [] + [] + [MsgRR {..}] + where + mhId = 31337 + mhFlags = MsgHeaderFlags + { mhQR = IsQuery + , mhOpcode = 0 + , mhAA = False + , mhTC = False + , mhRD = True + , mhRA = False + , mhZ = False + , mhAD = True + , mhCD = False + , mhRCode = 0 + } + + mhQDCount = 1 + mhANCount = 0 + mhNSCount = 0 + mhARCount = 1 + + rrName = fromLabels Root + rrClass = Class 512 + rrTTL = TTL 0x8000 + rrData = RDataOPT "" + + + +-- | Use @res_mkquery(3)@ to construct a DNS query message. +mkQueryRaw :: Class -> Name -> Type -> IO BS.ByteString +mkQueryRaw (Class cls) (Name name) qtype = withCResState $ \stptr -> do + allocaBytes max_msg_size $ \resptr -> do + _ <- c_memset resptr 0 max_msg_size + BS.useAsCString name $ \dn -> do + + rc1 <- c_res_opt_set_use_dnssec stptr + unless (rc1 == 0) $ + fail "res_init(3) failed" + + resetErrno + reslen <- c_res_mkquery stptr dn (fromIntegral cls) qtypeVal resptr max_msg_size + + unless (reslen <= max_msg_size) $ + fail "res_mkquery(3) message size overflow" + + errno <- getErrno + + when (reslen < 0) $ do + unless (errno == eOK) $ + throwErrno "res_query" + + fail "res_mkquery(3) failed" + + BS.packCStringLen (resptr, fromIntegral reslen) + + where + -- The DNS protocol is inherently 16-bit-offset based; so 64KiB is + -- a reasonable maximum message size most implementations seem to + -- support. + max_msg_size :: Num a => a + max_msg_size = 0x10000 + + qtypeVal :: CInt + qtypeVal = case qtype of Type w -> fromIntegral w + + +---------------------------------------------------------------------------- +-- Common High-level queries + +-- | Normalise 'Name' +-- +-- This function case folds 'Name's as described in +-- in [RFC 4343, section 3](https://tools.ietf.org/html/rfc4343#section-3) +-- by subtracting @0x20@ from all octets in the inclusive range +-- @[0x61..0x7A]@ (i.e. mapping @['a'..'z']@ to @['A'..'Z']@). +-- +-- This operation is idempotent. +caseFoldName :: Name -> Name +caseFoldName (Name n) = (Name n'') + where + n' = BS.map cf n + n'' | BS.null n' = "." + | BS.last n' == 0x2e {- '.' -} = n' + | otherwise = n' `mappend` "." + + -- case fold (c.f. RFC4343) + cf w | 0x61 <= w && w <= 0x7a = w - 0x20 + | otherwise = w + +---------------------------------------------------------------------------- + +-- | Query @A@ record (see [RFC 1035, section 3.4.1](https://tools.ietf.org/html/rfc1035#section-3.4.1)). +-- +-- This query returns only exact matches (modulo 'foldCaseName'). +-- E.g. in case of @CNAME@ responses even if the +-- answer section would contain @A@ records for the hostnames pointed +-- to by the @CNAME@. You can use 'query' if you need more control. +-- +-- >>> queryA (Name "www.google.com") +-- [(TTL 72,IPv4 0xd83acde4)] +-- +queryA :: Name -> IO [(TTL,IPv4)] +queryA n = do + res <- query classIN n' TypeA + pure [ (ttl,ip4) | MsgRR { rrData = RDataA ip4, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] + where + n' = caseFoldName n + +-- | Query @AAAA@ records (see [RFC 3596](https://tools.ietf.org/html/rfc3596)). +-- +-- This query returns only exact matches (modulo 'foldCaseName'). +-- E.g. in case of @CNAME@ responses even if the answer section would +-- contain @A@ records for the hostnames pointed to by the +-- @CNAME@. You can use 'query' if you need more control. +-- +-- >>> queryAAAA (Name "www.google.com") +-- [(TTL 299,IPv6 0x2a0014504001081e 0x2004)] +-- +queryAAAA :: Name -> IO [(TTL,IPv6)] +queryAAAA n = do + res <- query classIN n' TypeAAAA + pure [ (ttl,ip6) | MsgRR { rrData = RDataAAAA ip6, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] + where + n' = caseFoldName n + +-- | Query @CNAME@ records (see [RFC 1035, section 3.3.1](https://tools.ietf.org/html/rfc1035#section-3.3.1)). +-- +-- >>> queryCNAME (Name "hackage.haskell.org") +-- [(TTL 299,Name "j.global-ssl.fastly.net.")] +-- +queryCNAME :: Name -> IO [(TTL,Name)] +queryCNAME n = do + res <- query classIN n' TypeAAAA + pure [ (ttl,cname) | MsgRR { rrData = RDataCNAME cname, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] + where + n' = caseFoldName n + +-- | Query @TXT@ records (see [RFC 1035, section 3.3.14](https://tools.ietf.org/html/rfc1035#section-3.3.14)). +-- +-- >>> queryTXT (Name "_mirrors.hackage.haskell.org") +-- [(TTL 299,["0.urlbase=http://hackage.fpcomplete.com/", +-- "1.urlbase=http://objects-us-west-1.dream.io/hackage-mirror/"])] +-- +queryTXT :: Name -> IO [(TTL,[CharStr])] +queryTXT n = do + res <- query classIN n' TypeTXT + pure [ (ttl,txts) | MsgRR { rrData = RDataTXT txts, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] + where + n' = caseFoldName n + +-- | Query @SRV@ records (see [RFC 2782](https://tools.ietf.org/html/rfc2782)). +-- +-- >>> querySRV (Name "_imap._tcp.gmail.com") +-- [(TTL 21599,SRV {srvPriority = 0, srvWeight = 0, srvPort = 0, srvTarget = Name "."})] +-- +querySRV :: Name -> IO [(TTL,SRV Name)] +querySRV n = do + res <- query classIN n' TypeSRV + pure [ (ttl,srv) | MsgRR { rrData = RDataSRV srv, rrTTL = ttl, rrName = n1, rrClass = Class 1 } <- msgAN res, caseFoldName n1 == n' ] + where + n' = caseFoldName n diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src-test/Tests1.hs cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src-test/Tests1.hs --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/src-test/Tests1.hs 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/src-test/Tests1.hs 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1,91 @@ +{-# LANGUAGE OverloadedStrings #-} + +module Main where + +import Control.Applicative as A +import qualified Control.Exception as E +import Control.Monad +import qualified Data.ByteString as BS +import System.Directory (getDirectoryContents, removeFile) +import System.FilePath (dropExtension, takeExtension, (<.>), + ()) + +import qualified Test.Tasty as T +import qualified Test.Tasty.HUnit as T + +import qualified Network.DNS as DNS + +main :: IO () +main = do + msgfiles <- filter ((== ".bin") . takeExtension) <$> getDirectoryContents "testdata/msg" + + let tests1 = [ msgFileTest1 (dropExtension fn) | fn <- msgfiles ] + tests2 = [ msgFileTest2 (dropExtension fn) | fn <- msgfiles ] + + T.defaultMain (T.testGroup "" [ T.testGroup "decode" tests1 + , T.testGroup "enc/dec" tests2 + , T.testGroup "Type/TypeSym" + [ testTypeToFromSym1, testTypeToFromSym2 ] + , T.testGroup "mkQueryRaw" [ mkQueryRawText1 ] + ]) + +testTypeToFromSym1 :: T.TestTree +testTypeToFromSym1 = T.testCase "testTypeToFromSym1" $ do + forM_ [minBound..maxBound] $ \sym -> do + T.assertEqual "" (Just sym) (DNS.typeToSym . DNS.typeFromSym $ sym) + +testTypeToFromSym2 :: T.TestTree +testTypeToFromSym2 = T.testCase "testTypeToFromSym2" $ do + forM_ (map DNS.Type [minBound..maxBound]) $ \ty -> + case DNS.typeToSym ty of + Nothing -> pure () + Just sym -> T.assertEqual "" (DNS.typeFromSym sym) ty + +msgFileTest1 :: FilePath -> T.TestTree +msgFileTest1 fn = T.testCase fn $ do + bs <- BS.readFile ("testdata" "msg" fn <.> "bin") + msg1 <- assertJust "failed to decode message" $ DNS.decodeMessage bs + + -- load reference value + let refFn = "testdata" "msg" fn <.> "show" + writeFile (refFn ++ "~") (show (msg1 :: DNS.Msg DNS.Name)) + msg0 <- read <$> readFile refFn + + assertEqShow (pure ()) msg0 msg1 + removeFile (refFn ++ "~") + +msgFileTest2 :: FilePath -> T.TestTree +msgFileTest2 fn = T.testCase fn $ do + -- use this as reference message + bs <- BS.readFile ("testdata" "msg" fn <.> "bin") + msg0 <- assertJust "failed to decode stored message" $ DNS.decodeMessage bs + +-- print msg0 + + -- encode it now again + let Just msg0bin = DNS.encodeMessage (msg0 :: DNS.Msg DNS.Labels) + + msg1 <- assertJust "failed to decode re-encoded message" $ DNS.decodeMessage msg0bin + + assertEqShow (pure ()) msg0 msg1 + +mkQueryRawText1 :: T.TestTree +mkQueryRawText1 = T.testCase "mkQueryRawText1" $ do + msgraw <- DNS.mkQueryRaw DNS.classIN (DNS.Name "www.google.com") (DNS.typeFromSym DNS.TypeA) + + let Just msg = DNS.decodeMessage msgraw + + assertEqShow (pure ()) (head (DNS.msgQD msg)) (DNS.MsgQuestion (DNS.Name "www.google.com.") (DNS.Type 1) (DNS.Class 1)) + +assertJust :: String -> Maybe a -> IO a +assertJust msg Nothing = T.assertFailure msg +assertJust _ (Just v) = A.pure v + +assertEqShow :: Show a => IO () -> a -> a -> T.Assertion +assertEqShow onFail ref cur + | show ref /= show cur = do + onFail + T.assertFailure ("expected: " ++ show ref ++ "\n but got: " ++ show cur) + | otherwise = A.pure () + + Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/01ca022e21220474ca6100f21d137b42.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/01ca022e21220474ca6100f21d137b42.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/01ca022e21220474ca6100f21d137b42.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/01ca022e21220474ca6100f21d137b42.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/01ca022e21220474ca6100f21d137b42.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/01ca022e21220474ca6100f21d137b42.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 50673, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 185, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/033cb8330c8fba5fbb8bd48fd60fd6c3.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 24290, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_mirrors.hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 3637, rrData = RDataHINFO "ANY obsoleted" "See draft-ietf-dnsop-refuse-any"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/03edcc6e3a8f04350e45b3c718df1cb5.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 44451, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 28) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/04e610d95902b1898ee6abce328905dd.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/04e610d95902b1898ee6abce328905dd.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/04e610d95902b1898ee6abce328905dd.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/04e610d95902b1898ee6abce328905dd.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/04e610d95902b1898ee6abce328905dd.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/04e610d95902b1898ee6abce328905dd.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 50214, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 147, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/0c2248ed621e903da402b64d8dc12fbc.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 0, mhNSCount = 4, mhARCount = 1}, msgQD = [MsgQuestion (Name "com.") (Type 50) (Class 1)], msgAN = [], msgNS = [MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 593, rrData = RDataSOA (Name "a.gtld-servers.net.") (Name "nstld.verisign-grs.com.") 1494230811 1800 900 604800 86400},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 593, rrData = RDataRRSIG 6 8 1 900 1494835611 1494226611 27302 (Name "com.") ",\SYN\230\r\ESC\180\139\246|W?\207\SYN\218\185\223:\166\129\218\251\243]\"Vm\241\156\227.\145P\219N[\250\138\"\220k)j\133\&8B%\232\249xo\221\187\248\ESC\vO\143\135\219\174\161\ETB\199i\248\184X\DC3VrU\205o8\237\rN J\163L$\203\200\211\148\&6\157\b\NULj\204\185E\238\186\ETXmZ\226\240\162\202>Y\226\247\186\128\RS\232\250\DC18\196RenvB\193\185\202R1-\a\182\229\156\158\bB\241\173I\162:\SYN\212\156Z\161\167\182]\DC1vB\169\SOH2\DC1\244\236\226k\DC1\153\198\165\201\f\195X\199\237\205\NAK\GS\203\208=\229\142o\159\189\252n\144\155\191\228\DLE\199\244H)e\135\239z\134\240\&3\ENQ7Q\243xs\149\&0\233Pl\164\216\NAK\196&\SO\180\219w\249\176\163\136l\176\180\235\157y\ETB"},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "i.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "d.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "h.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "m.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "c.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "b.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "g.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "a.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "f.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "l.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "k.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "e.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataNS (Name "j.root-servers.net.")},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 203305, rrData = RDataRRSIG 2 8 0 518400 1495256400 1494129600 14796 (Name ".") "S/%\226\DC25\201D\151\140\161\243\248\192\a}\198\167!1\233\141h\205\203\ENQ\EM|8\204\184\224\b\203\223\r_'\187\US#\205YM\220\202?\240;z\136$\166\EOT\249M\251\146\&5\143\219\187\DLE\154\185Tx/\181\199\240s\184\135\171\247y\196\191\168E\216\159&\220\252\132\240\&0\a\217gI$\217\171\218}\ACK\144\DC3\199\t\tw\236\&7\151\SO\nQ\246\181aa_\251\156,\218[4\192\EOT(\165\NUL\163\233s\179$\tS\FS\147\176\228\179=\DC2pMP\186\155\FS\205njSC\159\187\142\b\215[\244\224\253z>\201\t\223\SI\t\165\153X\"\223\232\186sHg\DC2\196F\160\167E\144\ACKo\232[\132'\245\158Q\163\192\218i\175\214\157\ESC.\137mS\143W:\DC1\250\&8\251\DC3\226]\244\163\190uc\249\215\220\169V6\155H\DLE\216\180\NULh+v\150\255b2\168u\226u\175\177}T\206\163w\249]+h\EMRfx\US8\179\176\166l\186\190\199\229\155yB\184g\173\211\ACKA\208`g\136\216(\171~]P\159\203(q\159\234I\242\183j\153\&0\208>E\172\227r'yE\220\180Pl\184=\ESCI\243\155\SOHn\142\226\194\&9TI\192\r\192\FSu\129\143V\184\178\166\NAK\177\FSoI\239\179\GSs=\n]\237?\\?A\132\198\ACK\184\248\150\ETX\230\128\DC4+w\241\196\&5\160\246\131kG"},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 116905, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\168\NUL \169Uf\186B\232\134\187\128L\218\132\228~\245m\189z\236a&\NAKU,\236\144m!\SYN\208\239 p(\197\NAKT\DC4M\254\175\231\199\203\143\NUL]\209\130\&4\DC3:\192q\n\129\CAN,\225\253\DC4\173\"\131\188\131C_\157\242\246\&12Q\147\SUB\ETBm\240\218Q\229OB\230\EOT\134\r\251\&5\149\128%\SIU\156\197C\196\255\213\FS\190=\232\207\208g\EM#\DEL\159\196~\231)\218\ACK\131_\164R\232%\233\161\142\188.\203\207V4te,3\207V\169\ETX;\205\245\217s\DC2\ETB\151\236\128\137\EOT\ESCn\ETX\161\183-\ns[\152N\ETXhs\t3#$\242|-\186\133\233\219\NAK\232:\SOHC8.\151K\ACK!\193\142b^\206\201\aW}\158{\173\233RA\168\RS\187\232\169\SOH\212\211'n@\177\DC4\192\162\230\252\&8\209\156.j\171\STXdK(\DC3\245u\252!`\RS\r\238I\205\158\233jC\DLE>RMb\135="},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 116905, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\146\236\190\243\223\253`\216\DC3\194\252eC\162\\C}=(76\172\170\187\197\150)[\184,\139\207[\190\216\209mf\ACK\t\171\160Q\a\199\&0=\204\205\158u\ACK\216 Xc\231~\172\199w\227\213\188x\159\204\138\193\r2\212\198$^\248\DC4\221\162\150\DELH\231\155\202\179\229\DC3\213k\136\132R\ETX\249\162\SI\251\210k\128^j7\241\ESC\181\209\171\FS\221#m7c\165\SOH=S\138\250~S\130T\149P< +\226z\181\SI\131b\160\DELh-4Xn\168\196\241\252\129\235\DC3\144\221W\230\DEL\174a\198\168D\158\254i\218\SI1\221\SYNr\178\236\198\185\205\195\211zI\176g\206\130\156o\175\&5c\DC3\235\b\142\231\166\DC2\SOH\168\135_H\210\n9\164/\178sO|i\167\251\237\161b\202\214\184\171\239H\186\&5\187\DC4\227\203\SId\225\203~\FS3n\140'{\NUL,\158\r\DLE\168\195\156U\201\161\151\168\159\DC3p\191\190\&1"},MsgRR {rrName = Name ".", rrClass = Class 1, rrTTL = TTL 116905, rrData = RDataRRSIG 48 8 0 172800 1495411200 1493596800 19036 (Name ".") "Z\249\197\192\196\231A\191\251\179\224k_;\158N!<\182\173;\ENQz~D\183\SOH\129!\213\203:9\161\149f\201+\rD\nO\216v\230\191\234\176P\142\166.\180Z~M\161\249X\245\227\233\188\EM\249\212\186\172;\197n\217\145\221~\165\180G\152\181\ACK\216\149\205sg\v\186>J4\177\195b\237r\NAK\241~\220,\239\134O.\158,\189\ETB\193\bK\131t6\SYNL\245\SYN\206\140:;\163\235;'\134\239\157 \225\138d\251x\fG\175%(\142\150\212]Q\202\229\254\&8Q_\SUB\NAK9\138\DC2PN\194Gf\132\180\162\154o\206\DC4\161+\137N1\197\162\238\148F\NUL\219|,\217S\179g\140\248[\234'\130u+\201\234\212\185\SYN\220bqf\a\193\DC4%\249\212\140'\242c\194\235u\RS\n\222\169\SUB\130S\141\142E/\248R\143\130\&3\222\222\200jVe'\npj\ETX@\SYN\150\DC3\135Q\222ca?\144\210"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/36187d17453931a5d1563c69ed34fb52.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/36187d17453931a5d1563c69ed34fb52.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/36187d17453931a5d1563c69ed34fb52.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/36187d17453931a5d1563c69ed34fb52.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/36187d17453931a5d1563c69ed34fb52.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/36187d17453931a5d1563c69ed34fb52.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 16363, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 14, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "br.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "a.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "b.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "c.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "d.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "e.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "f.dns.br.")},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 5 1 172800 1494583200 1493978400 16335 (Name "br.") "C\r\136\233\&4\251z\214\ENQ\v\202fm\142\251`3\DEL\181\DLE\aj(/\242\STXO\243\208X\223\145\ETX\227-\146\153*Q\a\ESC\149^.:L\171\170\&7\227<7\221L\ETB\165\220y,\226\226WPF\RS\227\205\154\183\136\227\217\157\232b\177\189 \213@\b:\212\132\RS\240\236\187\240tca\153K/\193\225\132\ETB\166\NAK[VQ\253\175\166K\153\218\213\SUB%\249#\231\143\134\DC1\169\189!}5\CAN0\EOT\179\144q]V\201\178\STX\202\190\151f\163Ks\NUL\DLE\188\140=\SO\178\218\180\194\174\210m\222\223.\252'"},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataNSEC (Name "0800.br.") (fromList [Type 2,Type 6,Type 46,Type 47,Type 48])},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataRRSIG 47 5 1 900 1494583200 1493978400 16335 (Name "br.") "\154\183\204(\130\144\188O\252\209\225\ENQ\SO\252CET@Ve\203\253\139\140\199\243\206\238m+\223\185f\DLE\152$\ETB\159sW\246#\"\CAN\223`\196.\200\181\212\252|\199\ACKN\201\197+\ETB;-\179*.\US\140\f\164g<\r\163\247\173|\157@s\247I\170\ESC'\203f\US\201\204\&3\204S\169\164 \233\203\&8Gw\254\EOT\202\217\SUB\US\180\237\174]Ok\251\246\234\SUB1\242\167i\247\168\150\EOT\249\200\ETB\234\SOH\234\DELm\197\156\194O\223C\245\236\198\160\242]\NAKV\181\180\n\207\128\217@U\EM\180\132\220m\153"},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 21599, rrData = RDataDNSKEY 257 3 5 "\ETX\SOH\NUL\SOH\194\&8\150i\159U\208o\243\225G\214^\132fc\232\144h\"\135\188\SUB\SO\245\254\161\136\240\&4\146@\250\236\188\219\178\138\r\168\151\EOT\141\228\SUB'P\221\EM\SUB>6\NAK_P&\145\202zs\191'\238_f\252\240\230\165\201\SO%%{_o\249\SYNf\SIk\228s\234\DC4\229\223\234\144\r)V\152 =3\148\217~\192+K\243\163\ETX\151\141\160\137\151b_\218\156\209$\161\227\231\216\235\215\235\160r\199\223\159\223:\232\201\191\SIH\t\174\151\153\162UK\253x\247\195'\SO\240Ix\243\131\DEL_ws\DC3\188E\243`\252\170\242l\SYN\202\bz\194\RSI}U\\\205\178\166\136J\237}\249i\174\135\169\DC2\248Lg"},MsgRR {rrName = Name "br.", rrClass = Class 1, rrTTL = TTL 21599, rrData = RDataDNSKEY 256 3 5 "\ETX\SOH\NUL\SOH\209Zg\144K\201\185\174\150\154}\225\223\n\244\180\239\151\195\167\150\173\217\a#i(\189\166\192\"\175J\222\128\227\251U\217\235@t;@T\180\184\196\152\160b\NUL\217\231\245=\aX\b\ETB}{\228a\138@9\137\170\183\184\SO^\222Sh?\236\ENQ\130\151we\ESC\214:y\195\236%\254\139\194b\221!\161}\132!\190X]\217S\228\239:*\RSp\144\ENQ\202\228)\247\GS\169$\v5\254Na\192\131\135\197\242\ESChd\193\151`\162\EOT\235\252\195\130\179$\195\131\175\184H\SI\162^\156\248Z\162\194\143\143\246X \170\149\141\v@\184Z\b\DC1\SO\131\199\239>\166\166\&3y\235\&2\237\208m)\254\182(\140\&3z\144Ws\US\137\217\153Ujc\249\162'\138O\n$\230\179\&2\179\221u\140\r,G\209(\250\&8\137^0\210\174\224\154b09\188Hw\214m\173@#\226\SI\240\224\186\241\255(\176\DC1#\176l\f\231gBq\224l\SIXv\133\n\204\155\130S\212m \213u\196\200Z\235R}\244\216\&3l~^\136\189\174\DEL+\237.@\250\205\202\238-\184\206\222\&5v\186\SUB:\165%\DC3\NUL+\207t\189\CAN\200\n\140\172G\180\183\&6\200mc7M^\223GI\170\137\252\135\205Z\191\169\&8\b8P\216\130J\228 \EOT\187@\252\205\177\194Z\ETB\RS\190\165\218\158c\176\135\SUB:\198"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/3c973651b87bbb27d9249ef41ebd5c5e.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 39631, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x17603435)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x17647aaf)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x682bc3fb)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0x6828d323)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1057, rrData = RDataA (IPv4 0xbfefd5c5)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/419ae4b8b8770bad65e3bdf3cbc84ad3.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 60637, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3580, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 3480, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 633, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 733, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154963 1000 1000 1000 1800}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/47b446859b6bd9bf4d1e7348a356a43c.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 39296, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3428, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/4e49a68a7cbd8f6c69eab194c49b9888.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 21306, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 6) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2915, rrData = RDataSOA (Name "ns1.msft.net.") (Name "msnhst.microsoft.com.") 2017050703 7200 600 2419200 3600}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/4e86d529a6401b74f84956cd72682c15.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/4e86d529a6401b74f84956cd72682c15.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/4e86d529a6401b74f84956cd72682c15.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/4e86d529a6401b74f84956cd72682c15.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/4e86d529a6401b74f84956cd72682c15.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/4e86d529a6401b74f84956cd72682c15.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 31, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "torproject.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataNSEC3PARAM 1 0 16 "\185\181\DC2\245\247"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataRRSIG 51 8 2 0 1497380687 1493921581 59061 (Name "torproject.org.") "\ESC\139\217>\186\USz(\219\227J\162\235\215t\166\171\198\136\243\146\202;\128\130<\152\232\SOH\167>\248Q \177\130'\NUL\231\199\199\222\172\fE\206g$sR'\205=\216\188\211\152\230\232\202mV\220\164\128xsj\129\138\173\ESC\217\SYN`\NUL\231RE{by\173\177\235\ACK\203IT\128\167\212\197J\174\205V\145\n\133\NUL\175 \187\200\232\b\200*/-\141R>|W\153\176 \242\201\160\SIK\SUB\146\160\227\242\146\181\STX%\129\195\b\209\210N\FS\GS\255\174e\FS\227!}\179g\211\148\188\159b),\149ym7\fi\155\163A\181T\169\154\196/\141\212\170\224\198\253q#F\DLE\ETX\141\217\216\133,0\163\183\207"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataSOA (Name "nevii.torproject.org.") (Name "hostmaster.torproject.org.") 2017050738 10800 3600 1814400 3601},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 28 8 2 300 1497627735 1494168135 59061 (Name "torproject.org.") "csn\208v\207*\137\134\225U\CAN\187\253\212\&2\176\223\250;\205`\DC2\b\\\a&\246\188\203\133\215q@U\DEL\247\170z\r\GS\172\193\243\177\CAN\183(\196J\253\192\240<\255\199\226]\252U\242\EMdJ\156\171p\245A\189\EOT\250]\253\220,\138\224-V\209\171R\158U\132B{\159cl\202#\ACK2\216\249+\213npY\EOT\133\129GFl\249b\GS\154\189\243+)\230\132\170\240'Q\167\&2r\210\SOH\DEL\196S\163\145\&9\136\208\181\NUL]\ACK\GS\142\140\164\241\253\134j\135\DEL\135\&0\159\145\US\ESC>\163\208\\\",\236\217h|\245\&1\DC4\179,\189\211\174bo\DEL?\\\235[\SI\229\176\DC3\244\190b\224/\129\ENQ\245"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2620000006b0000b 0x1a1a000026e54810)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2001085800020002 0xaabb0000563b1e28)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200141b802020deb 0x21321fffe201426)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2a0104f801721b46 0xabba00050001)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200106b0005a5000 0x5)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 15 8 2 3600 1497532518 1494075620 59061 (Name "torproject.org.") "=KT\176\SYN\SYN\226\&6\213k\171{\174\213{\209\NUL\171\250\&9D\168\t\177\202v\249\143\&1\211~:8\220\214g!\134\167\250\175\136\&5J/\205\205&\231\DC4\161\252\144~\160\245\250\210\213\253\139\205\199\215\234P\248\b-\179\157%\138Y/R\201\171\189e\241\203\181rHQ\CANsB\248$\217\202\144a\237\&1U4\EOTe:W\201\SYNrU\\\EOTy\207\224\214\244+\255U}e\169\&4\243\SUB\192\CAN#.CY\DC2$\133np\170N\219\242\245\&2\163\154\134\232R\v(\171\ETB\242=\225V\196g\228\147\231\STX]\US\238m\175ok\238\160\CAN\172{w\ACK\"\173\ACK\240P\208;H\195Hf@u\228\&0l(\165\131"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 1 8 2 300 1497627735 1494168135 59061 (Name "torproject.org.") "C%\201\209\ai\SUB\SYN\150_\EOT\209@/\183\150\229s\156\&8\250\177\174\245!\154\USH\132\188\DC3\138]\167}l\182\&8=\166\233\DEL\153T\169\159O9\195\177\"T\130\146\223s\ACKkp\224\172\DC2\\\182\224\ESC\STX\DC1\202\224\243_u\204\246\159\146t=`\ENQ\UST\157)5-3\212=\151\250U\180J\EM\202\DC2\200\169a+\196T\226\228x2\NUL\208\141\189\178#\b\US\189\ACKU{\245\tq7\216\158\159\237;6\196l\193\146\178\178\&8\161\154e\166\210\150\183c]!\DEL\211>\US&\EOT\208\253Q\161x\FS\251\186\141T7\171%=\207c\ETX\t#H\208\157t\252\194$(rI\146\223\189<\SUB\211\161\&5\253D"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 86400 1497572963 1494115902 59061 (Name "torproject.org.") "$_\241\250\&5\246[\189\226iR\196\138PqqH\214\176@!\155\244V\195\224G\209n\234z\SYN.\151\SYN\187\194\151\167!#x\222\&4\163\169\170\232Ac\181Z\142\233\166\CAN\246\EOT\t\132\218\&0\213\140AK\220\162\237\248\144l\161z\RS\128\254\213\176\223\US\231\139\203\215\"\145\214$\192l\153F +[\175\201\"\136\189\r%\177\169\194\242\145\158\233\EM\202\NUL4w\238\168\SOH\a\DC15\n\160\221\DC2\rj'+\194\130c\ENQ\198k\249{/p]\181\159\202h\167\151\162dH\SOmt\242\176J\134\229\163d\203\222\214*\245\252cYqa\242Q\GS\192:\167\EM.\200E\171@\NAK2P\SUB0l\247=-(\f"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 6 8 2 3600 1497692652 1494233052 59061 (Name "torproject.org.") "'^\229\253\SO\135\241\160\t\195\229W\129\150\201\130\251q@\213\217\&3.;\243\218!\192\183<\217~q\ENQ+\ENQ\DC2M\230\135}\183\197\168#\143\&5\201\213_\SUBx\196\\{\218\"\234(\216\133\211\209\213N\237\USRURz\128P\NAK\253y\175\207\DC3\230m\202\164\222\&9\167\128\220\ESC\184\206dB\SI\152\189\133q#Ua\234\175\200G\FS\224\189'Kk\143\229u\136vX\SYNY\242n.~t\188\132\254|\244\150k4\217\180\181\b\167\DC2\181\174\150\139)Jo\145-\180\141$\225\DC1\245\a\154\GS\201Fb\213\150q\v\v\140\&608\158\216\144Yj\184\151\237?\192\190\EOT\162?,\249\STXb\166\187\254\199w\212"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1497462010 1494002410 17224 (Name "torproject.org.") "\143\&8*?\209\140\SI\160f\254h\203\v\219\226B\153\148U\SI\159\182\233\158\ETX\149\134\142\US\233`\\\138L\DLE\135txpz\148\198y\230\237\230h\228\&0W\179\n\186\ETB\194\146\DEL\r/\190\138t\188\&1\202\164\EM\RS\163\183\184\EM\DC1\CAN1\204\207 \rk\129\200^+z\" \134\SO\RSX\249\DC4\130\206\204,\158\158\130\159\176\&8\248p;}-M\139\r\133\152\&1\217\203\r\246\ACK\234\ETXd\246\247\135O\252\153\229(\250d9\159T\184u\202Q\195\SOH\146\176;\137OM\219\DEL\DEL\178\249\STX\b*{\186e\203\157\150\&1\194x\147#9\161\232\143\172\250\168\172\ENQZ\194\233S\EMr7\234\220\142\233\205x\132T\v \183a\158\225\214(\240\234\143h\217\230\DEL\229YX\213 \211\228\146\&2\ESC\187\229`\132\187k\231a\EM\193\129\DLEW\246Wm\231\197#\ESC\NAK\158p()\a\\V\164\152\164\252\158\&6\168\200\140\&8e\147c"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1497462010 1494002410 35740 (Name "torproject.org.") "bZI\194E(T\n\244~\160@\SYN\DC4L\164\167\251|\251\n\254\162\184\139\NULe\247\159\DEL\NUL[\180\152?\153\148\DC2\203\138\253\155\189\248\139\178b\192\149u \NAK\235\204\194\NUL\203\205|/7\130\&9\147>\139{1L\182/[\165\205R\233A\175=s\157\242,\230:\211\210\163\187v\DEL\160u\205\136\253\176\252\b\156\ENQ\158;\239\153sTw_7j\227w\129\194tA\161\DC2\227\182#\DEL\174\212\251\148\151\205\201,\167\SO\243\132\198\138]\161|\129\199\&9\160\151'\243\&7\226\150/\238\192v\159\129.\209\170RNV\233\238\212\254\255\158\v\251\137\206\175\180\214K\253L\144V)\179>m$\131\147\241|\242w[z\246cVV\216p\142e@)\232\253\146i\200\220\196\234[\230\203C\b\234\141\139\157:z\a\202\141\166a\ta\DC2g\188\239\196\194\186\220A\202\246K?M\217w\158\199\208d\216$\188\215\136t\175"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1497462010 1494002410 59061 (Name "torproject.org.") "D&\210'\154\164~\193;m\223\216\174\203\&0[\159\208\220\236\232\206u\DC3\ETXn\214l@\195\223g\252Z\254\147T\DELWc\246\129\185\141\v\133\147_\DC4\NAK\173\231[\195\216h\225\159F=\SO\188\230\&0\254\DC4+_E\155\174%A\ETX\229j\vuKz\ENQ\150\240\bV['\237u}P\255\155@\154\149\247\189\251\EOT\DLE\t\174\254\142$x\RS\245~p\248\139\172\240\254\249b\184\SYN$\228\DC4\ACK\168_\189-S\202\136\210\213\198\DC3y\169\144\SI\149\250\v,vW)C\187S+\147\183\SUB<\167c\SUB\188\CAN#\144\195\FS\182}\185\139N\199\251`2\139\140\255|V\238\158r\ESC\CAN\215\STXZ1\170\188R\f\228\221"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\180\DC4Zp{K?\191H\186\210^\193\197\EOTV\232\145\161\187\238\v!\209\240\NAK\192\191}>3\214\246\145o\152\142%\134\208CZR\US\157\147=\DEL\128\238\NAKH\138jA\222\155M\164\153\225a\172F\135\189F\135'g-N\197*\131\171\b>P\128\138b{\r\157u\230[rpa7\ESC\194\162-\255;>\170X\231\150\177\&3w\255\173\226X\143:\196\241z\131\CAN\146(\US|_\154)*\b\152\184\ENQ\182\159\STX\CAN\178\183\238!\248\b\172\EOT/\166\144\151\DC1U\140\&7W\NUL\200\246\a\STX\174\225\175\249\130\149\SO^\250o\"\173\250\143\178S\220c\178\197;\EOTz\149\SUBi\181\211\254\209\142md\209\135\201;"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\208\227\159\216\218\187\227H\b\208\244\f\139\EOT\159\210vW\RS\163:\SUB\180\179Y\255\178\156|0\160r\187\b\197\251\183\201\147xh\227\&9\202\194\209{\211xv\241\134Q\201EQ\151[\140,a\251<\DLE\211\230\196\&9s2\226\253\225\226\&2\173,09\192\217\bx\247>R\CAN\224] 6E$k3&\159P\205\163\248v\153\ETXi{\129,nhf\144LF\212\NUL\SUBkt~?\184\190\207v\228\165D\196\163\&3@\198\249![\224\148]\182Pv\212\165\238p\162\165\212\175a\167\206\152\138\130\130\176\167/>\164D\194,-\t\255\ETB\201\&3\143\230\DC4}\255\236\226\"E\224\138\150\168\SO\SOH\221\163\156c\EM&\148\&8\135\&7\v~\211\&1\ENQ\252_\234r\137{\184\239\174\233\&2\206\DC2\NAK5\RS\174\242\213K=T\194).\196\158\165\&0i\136Dh&\231\&0\SOH2\SYN\130\ACK\243\&5\131\198L\234}\188\242\&2\174\248\130\151"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\201eI\ACKo\150\NUL\219\&5d\"\\\t\226_\210\DC3#%\169r\169S\ESC\132\EOT\181\SI\EOT\DC3#\t^\220\178jNrh\DC3\SYN\162o\ESC\236\162\181\196\232\165\169\209\243\"\v\NULx4\ru\175a%\169\&5\165\SUBC\177\&1\SUB[\DELn\SO\230/\137\&8\136\205U\195&\245vC.V4`\180J~,c\198\233\245\186\184.\146\151pt\198IYI\198,\248\252OO8\172;*\190v$\181\195\128\147\DC4\n\140\DLE\RS5\159\139\136\253\&1}S\254\SYN\218pI\225~8\234@\144%\131\191;u\133S&\154\130\221\220\213G}@\153\141\218,\161\190\t\172Y\v\211\218\245\&6#9e}\188\ENQ\164\134n\130\222\191\239\190\200\202\132\241\157\211\FS\227\147\DC2\198\156kE\SI\247\133\170\145\206\210v\148\EM\148%\200\229\192\220^\222Ye}\194*\237(\149-\171q\242\157\SUB\170\249\213\199\153\RS\v\137\222\191\183\180\209\167\183"},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns5.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns1.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns3.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns4.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns2.torproject.org.")},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x9a238446)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x8ac90ec5)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x26e54810)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x592deb15)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x563b1e28)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x52c34b65)},MsgRR {rrName = Name "torproject.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataMX 10 (Name "eugeni.torproject.org.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/53d71a9e72adf19251123b46f31769bb.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/53d71a9e72adf19251123b46f31769bb.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/53d71a9e72adf19251123b46f31769bb.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/53d71a9e72adf19251123b46f31769bb.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/53d71a9e72adf19251123b46f31769bb.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/53d71a9e72adf19251123b46f31769bb.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 38143, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataPTR (Name "ghc.haskell.org.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/54f81230e47e2399d16a309e1227025e.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/54f81230e47e2399d16a309e1227025e.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/54f81230e47e2399d16a309e1227025e.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/54f81230e47e2399d16a309e1227025e.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/54f81230e47e2399d16a309e1227025e.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/54f81230e47e2399d16a309e1227025e.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 53536, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2306, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/552aec026306990d49a098d0a4608434.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/552aec026306990d49a098d0a4608434.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/552aec026306990d49a098d0a4608434.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/552aec026306990d49a098d0a4608434.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/552aec026306990d49a098d0a4608434.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/552aec026306990d49a098d0a4608434.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 2, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "4.4.2.2.3.3.5.6.8.1.4.4.e164.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.2.2.3.3.5.6.8.1.4.4.e164.arpa.", rrClass = Class 1, rrTTL = TTL 86046, rrData = RDataNAPTR 100 20 "u" "E2U+pstn:tel" "!^(.*)$!tel:\\1!" (Name ".")},MsgRR {rrName = Name "4.4.2.2.3.3.5.6.8.1.4.4.e164.arpa.", rrClass = Class 1, rrTTL = TTL 86046, rrData = RDataNAPTR 100 10 "u" "E2U+sip" "!^\\+441865332(.*)$!sip:\\1@nominet.org.uk!" (Name ".")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/57394dfc69f9e32c0c0cd9d4d2057d87.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 45729, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3542, rrData = RDataMX 10 (Name "microsoft-com.mail.protection.outlook.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/579ff887c8ea54e4173934be5e85faec.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/579ff887c8ea54e4173934be5e85faec.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/579ff887c8ea54e4173934be5e85faec.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/579ff887c8ea54e4173934be5e85faec.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/579ff887c8ea54e4173934be5e85faec.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/579ff887c8ea54e4173934be5e85faec.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 33589, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1524, rrData = RDataTXT ["docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"]}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/585424227713068d541ca07b184abd89.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/585424227713068d541ca07b184abd89.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/585424227713068d541ca07b184abd89.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/585424227713068d541ca07b184abd89.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/585424227713068d541ca07b184abd89.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/585424227713068d541ca07b184abd89.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 32, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "eff.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataSOA (Name "ns1.eff.org.") (Name "hostmaster.eff.org.") 2017042405 600 1800 604800 1800},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNS (Name "ns6.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNS (Name "ns1.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNS (Name "ns2.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataTXT ["v=spf1 mx ip4:173.239.79.202 include:spf1.eff.org include:spf2.eff.org -all"]},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 10 (Name "dummy1.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 15 (Name "dummy2.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 5 (Name "mail2.eff.org.")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataA (IPv4 0x4532e836)},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 220 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 230 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 240 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 250 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 260 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 270 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 280 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 290 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 300 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 310 10 "" " !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 320 10 "" " !!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 100 10 "" " !!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 110 10 "" " !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 120 10 "" " !!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 130 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 140 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 150 10 "" " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 160 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 170 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!! !!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 180 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 190 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 200 10 "" " @@@@@@@!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!! " "" (Name ".")},MsgRR {rrName = Name "eff.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNAPTR 210 10 "" " @@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " "" (Name ".")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/593b5d26fc010f953c99621a7d608c8d.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/593b5d26fc010f953c99621a7d608c8d.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/593b5d26fc010f953c99621a7d608c8d.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 19974, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2950, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 20003, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 999, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494155229 1000 1000 1000 1800}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/5fb7059d3cc96ae5eb05b06b7212bf76.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 64444, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 2, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.google.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xd83ac9e4)},MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2a00145040070816 0x2004)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/60c1e26a578cd3007a592250dbad30be.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/60c1e26a578cd3007a592250dbad30be.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/60c1e26a578cd3007a592250dbad30be.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/60c1e26a578cd3007a592250dbad30be.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/60c1e26a578cd3007a592250dbad30be.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/60c1e26a578cd3007a592250dbad30be.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 61653, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 148, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x97650044)},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x97654044)},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x97658044)},MsgRR {rrName = Name "j.global-ssl.fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataA (IPv4 0x9765c044)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/616d307f2f3407a001c0ed31ae01daf8.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 2963, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 6) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/62a40ed1d8ac22ee6dcca1d8cc6e1733.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 26891, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2846, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 16652, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 999, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494155077 1000 1000 1000 1800}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/62ce31cf45d2d095d384da330a6e6189.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/62ce31cf45d2d095d384da330a6e6189.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/62ce31cf45d2d095d384da330a6e6189.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 32245, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/68c43b7f9e85fb0b77552dc905fe6537.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 10072, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "_mirrors.hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataTXT ["0.urlbase=http://hackage.fpcomplete.com/","1.urlbase=http://objects-us-west-1.dream.io/hackage-mirror/"]}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6a0b07a53da450663489f3ff62fc7866.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6a0b07a53da450663489f3ff62fc7866.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6a0b07a53da450663489f3ff62fc7866.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "fencepost.gnu.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "fencepost.gnu.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2001483001340003 0xe)},MsgRR {rrName = Name "fencepost.gnu.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xd076eb0a)},MsgRR {rrName = Name "fencepost.gnu.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataSSHFP 1 1 "\ETB8\CAN\146I?\149\218`\185\b[f\189\CAN\185\142\190\252#"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6b49a8a930ab6cdaf5ae91c822247811.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 23209, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2381, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 16755, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 590, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154820 1000 1000 1000 1800}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/6f5b2b7d7ffa62ab3b6bce45ab3b0b51.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 3198, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 16) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="]}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/75330cfe5b4c19161dee2d9f578d8fb4.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 1192, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3478, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7a13aa49d0b498ee7b5073d1f1370273.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 51432, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "_xmpp-server._tcp.gmail.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt3.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt4.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 5, srvWeight = 0, srvPort = 5269, srvTarget = Name "xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt2.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt1.xmpp-server.l.google.com."})}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7c47e44ab3c0e8d6f3d5f4246dc4a0d2.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 24972, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "4.4.8.8.in-addr.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.8.8.in-addr.arpa.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataPTR (Name "google-public-dns-b.google.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7e3570aada9975cbb2285ed217fe5016.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7e3570aada9975cbb2285ed217fe5016.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7e3570aada9975cbb2285ed217fe5016.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 7, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "example.com.") (Type 43) (Class 1)], msgAN = [MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31589 8 1 "4\144\166\128mG\241z4\194\158,\232\SO\138\153\159\251\228\190"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31589 8 2 "\205\224\215B\214\153\138\165T\169-\137\SI\129\132\198\152\207\172\138&\250Y\135Z\153\f\ETX\229v4<"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 43547 8 1 "\182\"Z\178\204a>\r\202yb\189\194\&4.\164\241\181`\131"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 43547 8 2 "aZd#5C\246oD\214\137\&3b[\ETBI|\137\167\SO\133\142\215j!E\153~\223\150\169\CAN"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31406 8 1 "\CAN\153h\129\RSn\186\134-\214\194\t\247V#\216\217\237\145B"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataDS 31406 8 2 "\247\140\243\&4Or\DC3r5\t\142\203\189\b\148|,\144\SOH\199\246\160\133\161\DELQ\139]\143k\145m"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 64454, rrData = RDataRRSIG 43 8 2 86400 1494563200 1493954200 27302 (Name "com.") "\133-dQ\179\DC3\EMi\SI\166\249\140E\212\163\219\181k\SI\197\198M\231\EOTJ\203YO\189Z\151\170p\232U$\160\DC2A6\234c\233\DLE\183\150\200\SOH\177\164\DC2c\161\223\201AB\ENQr\241*\a\251]\tWQ\219\128vPs\145g@\153=\140\141\139\176\222\238:d\145\184\SYN`\ACK\156Z\SIavT@\ENQ\140\179D\200@ s\190\239r\237\160\213\225\FS\215\129\EM\252\ETX\135\ENQ]\225*\CAN\USg\240\242"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/7f4d4de8e74e86e10d19f1f7428609e4.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 65505, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 1318, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/816c6c332941a20f07c497ee16609971.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/816c6c332941a20f07c497ee16609971.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/816c6c332941a20f07c497ee16609971.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/816c6c332941a20f07c497ee16609971.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/816c6c332941a20f07c497ee16609971.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/816c6c332941a20f07c497ee16609971.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 10909, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x6828d323)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0xbfefd5c5)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x17603435)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x17647aaf)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 905, rrData = RDataA (IPv4 0x682bc3fb)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/81c9cbfb364a8be0302bd0f4f600c3f6.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31016, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "4.4.8.8.in-addr.arpa.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.8.8.in-addr.arpa.", rrClass = Class 1, rrTTL = TTL 86133, rrData = RDataPTR (Name "google-public-dns-b.google.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/87aace8db5b6cb0b4b8c6194967f345b.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 0, mhNSCount = 4, mhARCount = 1}, msgQD = [MsgQuestion (Name "debian.org.") (Type 50) (Class 1)], msgAN = [], msgNS = [MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataSOA (Name "denis.debian.org.") (Name "hostmaster.debian.org.") 2017050804 1800 600 1814400 600},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataRRSIG 6 8 2 3600 1497698216 1494238616 53598 (Name "debian.org.") "\141G\148\&8Ru\215~\167\220\201\a\234\142\f\136?p\174d\136E\130\135\136\&7vA\212\"x \188\189\SYN\166x\158y\236\DC18\163\241\217B\169;\200IUF\136\138\253A2Fq\150M:\174C/Y\GS\194XD\135\216\140P\DC1U\187\STX\163DM\182\205\243\185\170\165C\209,bp\195\246\236\162)\180\209\ETX\216\232\219\241<\219\158S\EOT+$C\250\174\b\237\155:\233\177@\208F\192\198\131\132zsO9@\f\247\138\SOHjM>ajU\179\t\n\222\203b\DLE\253\224\&4\240\DC4N\146ua\148\208\185\183:}\156\148\153\171\ve\180\SI\229\193\140\232\SOH\182<#?P\STX\164#3\167.\163\143\&9\205"},MsgRR {rrName = Name "r0ju544ltcbavo1k3br87djp168tl58j.debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataNSEC3 1 0 16 "\SO\192\162\220\222" "\216>\235R\171\NAK\DC2a\203\134\DC37\173/E\197I$\182v" (fromList [Type 1,Type 2,Type 6,Type 15,Type 28,Type 35,Type 46,Type 48,Type 51,Type 65534])},MsgRR {rrName = Name "r0ju544ltcbavo1k3br87djp168tl58j.debian.org.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataRRSIG 50 8 3 600 1497614849 1494156550 53598 (Name "debian.org.") "\234\DLE\144\162h\RSm\188|\SOHB\233\215\RSJ0\DLEoD \218\178\131|\251\205\&3\246WZ\227\208\v\EMD\251\153t\193\155\145\133w7\EM+\133\244\129\159\SUBgT\DLE~{\229\218\187\&7<\173D\169\204\169f*\v\189\149_\161\210\207\173\169\166\DC3\168\DLE\n\141F\221\138f\131\214'\194\131\ACKc\r,e\180\bON\235'\132\r\198\160\242\v*\ETX\ETB\140x<\135\165\219\ETXk\NUL\221\&0\216/};\223\241\US\"*@\230\135`\216\222\207\234\217dfI;\238g5u+\DC1e\155\SO\195\239\229\196("},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC (Name "_openpgpkey.fedoraproject.org.") (fromList [Type 16,Type 46,Type 47,Type 256])},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 47 5 3 86400 1496578736 1493986736 7725 (Name "fedoraproject.org.") "\144\141\152~q\a\220}#\DC2\228\150\140\166\209\152B\202\r\SO\184\ENQ\176\202\SOH\167\ETB==\\WN\ETB\193\242\159v\141\218\158\232\DC3O3x\130=\188P0\SI(\140\129R)\223fd\183qB\187_\GS\165\128wGR\228p\204\&7\DC3\173\186\130\221l\135\STX\STX\147\DLEV\243\159\&9\STX\138\209\DC4=\DLE\DC4\"/X\232Y\190\134\198\216k-\160q:p\206\189\176~ \154\242\226\&9m\232Z\214\129 \228_"},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataURI 10 1 "krb5srv:m:kkdcp:https://id.fedoraproject.org/KdcProxy/"},MsgRR {rrName = Name "_kerberos.fedoraproject.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 256 5 3 300 1496578736 1493986736 7725 (Name "fedoraproject.org.") "\ESCg\174[\230\138Y_\218\200\&2\SUB^\ETX\243\128\&6\180\131\136\245\181\158'\224%\204n~%\CANN=n2L\146\203h\198\153\SYN\175\221\243\EOT\171}\137\136\181\SO\191\226b\152\SI\222k{\132R\143\220U@\250\220~\235\154\159\186E\211&\187\174Jjjs\196H:%\248\EOT\235\194\182\139q\181\158\187\131\164bE\f:\210^f\NAK\147\ETXF\RS\203\&4\174\188\164\153\198\v\142kJ\188\136\173~\150\128_"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/8e08e117a1d187bac5d498ffc2797f3a.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 16846, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 185, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/9499a890bd65e85e74e68ca5631941f7.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/9499a890bd65e85e74e68ca5631941f7.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/9499a890bd65e85e74e68ca5631941f7.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 48779, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 5, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "_xmpp-server._tcp.gmail.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt3.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt1.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 5, srvWeight = 0, srvPort = 5269, srvTarget = Name "xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt2.xmpp-server.l.google.com."})},MsgRR {rrName = Name "_xmpp-server._tcp.gmail.com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSRV (SRV {srvPriority = 20, srvWeight = 0, srvPort = 5269, srvTarget = Name "alt4.xmpp-server.l.google.com."})}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/949ea24aecb8e40432f6af14ceb91ab6.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 3}, mhQDCount = 1, mhANCount = 0, mhNSCount = 8, mhARCount = 1}, msgQD = [MsgQuestion (Name "xfoo.org.") (Type 255) (Class 1)], msgAN = [], msgNS = [MsgRR {rrName = Name "dlbdq9qmbnmmf3v28ndnjkv55oc2f0ad.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC3 1 1 1 "\211\153\234\171" "mW\246\229v\\-\n\185\148\151&\141\DEL\a\191\200\217%\231" (fromList [Type 2,Type 43,Type 46])},MsgRR {rrName = Name "dlbdq9qmbnmmf3v28ndnjkv55oc2f0ad.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 50 7 2 86400 1496158069 1494340069 3947 (Name "org.") "v\DLEJ\225\185\241\204\204jl\208\SYN\221(%\168G:eLV\241E\195$\239\CAN\223\164\195\CAN\246E|\179M\168G\159\&2RAR'\136\150\171\NUL\238%\ACK\EM\196\143\r\250\222N\244x\244\&1\255=g|dB/\239Y\b\205\255n\156\179&\140\ETBfG\232\207\172\f\ETB\251GK\201\DC4\180\242\209\172\149\218\210\222\145\161^yi\144\246\&2A\141\239\140\214(\190\EOT\251\165\211ySH\EOT8\232\ETX\DC2\222"},MsgRR {rrName = Name "h9p7u7tr2u91d0v0ljs9l1gidnp90u3h.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC3 1 1 1 "\211\153\234\171" "\138r\173\236\198OM\228`0\228\DC2\224\214\210\237\b\215X\GS" (fromList [Type 2,Type 6,Type 46,Type 48,Type 51])},MsgRR {rrName = Name "h9p7u7tr2u91d0v0ljs9l1gidnp90u3h.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 50 7 2 86400 1496166683 1494348683 3947 (Name "org.") "\162,\189o\CAN@\248\170$\DEL\DC4|\128\134\232\SYN\246\230rE\153{A\173x\241#8|\231N\166\163{b\145[uB\f\148,\148(\242E_\192\225L\193\186*\232\154\US\173\174\133^\SUB[\139\208+B\CANOc=\144R\NAK\228\ACKc\237\171\159\181\b\SOH$;\138\216o\ETBq*\225\251\225\133WJlX\SOH=K\ETX\198\182\149\255\133\NAK\186R\213&\206\211\244\150\US\DC3'\f\186]\ETB\242BE\DLE\DC3"},MsgRR {rrName = Name "vaittv1g2ies9s3920soaumh73klnhs5.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNSEC3 1 1 1 "\211\153\234\171" "\250\166\180%\ru\DEL\210\250d\146Z\NAK\237\162~\250\190\&2\193" (fromList [Type 2,Type 43,Type 46])},MsgRR {rrName = Name "vaittv1g2ies9s3920soaumh73klnhs5.org.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 50 7 2 86400 1496158069 1494340069 3947 (Name "org.") "gO\136U\GSsg\199\162 \243\158\STX\190~\131\ETX\228=.\211x\191\SUB\194_\241\FS\158 \167\202\170\221\141\148\220\165\159\170\253\209\182\195\\\218N\132\&6\254\EM\158\200\251\\t\146\244\&1\254\241\DC41E\248\143)\227Hm\CAN,\EM\255\207~e|\163\200Eh\227q\ESC]}\169\188\229\139\245\166\206\221\254\145%\150\136\190T@\DC4:\SOH\249\177\148\189)le%_V\186u'\214\254C\245\NAK\212]l\237"},MsgRR {rrName = Name "org.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSOA (Name "a0.org.afilias-nst.info.") (Name "noc.afilias-nst.info.") 2012479177 1800 900 604800 86400},MsgRR {rrName = Name "org.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataRRSIG 6 7 1 900 1496166683 1494348683 3947 (Name "org.") "\DC1U\179b4\204\v\240\182\f-\170\206\195\144O2p\DC3\174\160\251\177\r\185\RS\199\RS\239\221/@\b\136\235\201[B\n\236P\SUBb\198>W\163~\221^\233\ETBr\\c\212\238\185\136w\USUG\128\201\161\&8\128WU\SUBS~~!\208\160\206\191H{u\158\192mP\253GE\128\155\nY\207\SOH_\DEL\163\208\195\139\US \225\253\182\237\231\244J\135-\ETB\204\130\187\217\209\162\161t\212\220\b\\l\ACK\NAK"}], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/98b101299888feb502f38066db59f0af.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/98b101299888feb502f38066db59f0af.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/98b101299888feb502f38066db59f0af.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/98b101299888feb502f38066db59f0af.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/98b101299888feb502f38066db59f0af.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/98b101299888feb502f38066db59f0af.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 18, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "openssl.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataSOA (Name "auth.openssl.org.") (Name "hostmaster.openssl.org.") 2017032573 86400 900 604800 3600},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNS (Name "secondary.lp.se.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNS (Name "primary.lp.se.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNS (Name "ns.openssl.org.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataA (IPv4 0xc26196ea)},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataAAAA (IPv6 0x200106080c000180 0x100ea)},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataMX 50 (Name "mta.openssl.org.")},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\162l\158\239\255\&3\RS\144\175\162\&3}\143|\138\214Nk\NUL\200\217\214#*\171\176SW\ETX_-\200\235B\152\232\DC3\191\182\ACK\240\160\198R\188\156D\147\163L2\199\170\245\142\187\195\169\178\135\159\203\242o\177\196\230\129\234\206\171]\151\192S\225ufi\ACKKy>~D\134\192]\150}\168x\181O\250\214\ENQ8H\143\222.\221X\169_)\202\239\180\226}\200\189\252\v*\r/\210RP\145\184mk\197{"},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\188i\181\221\168\175\172\SOH\f>\207\ACK\209\158\184f\DC4\200\139e\164m\149\SO\140\240\198s\161\SYN#\ESC\151Vkd\145\193~\239\254\226\199\252\&9*\130M\DC1\157\148\132\169'\187\153\185R\139\186~\SYNg\153\239\128|\249\140\v+\194\a\r\220\128\150\&1\225\168_%\144\131\ETB>\DC3d\254\249M;\ESC\178\168\ETB7\216\193\198\173\165wT\EM\182and.\222\195\133\193\137\209+\130 K\243\&77\150\211\234{\NULO\153s\ACK\230\212\143\186\141\CANl\247o+\171\136\217i/\SOH\255~\181I\255\128\239E\176\&0\224\205\SOH\141cK+q\253\t\162[\131\225o\248\144\140\173\151\204\144\&5}`\246\ESCn\180\t6U\US\251HY\210\249S6\190Q\207\195`\220H\237\165|\193+\NAKZz#\237\172\166\138\139\EOT!\STXC\210d\198\238\238\RS6\188\SYN\189\US|k\DLE\131\201\136\233e\166\\R\171\231\215\ENQK\b\179\EM[\153\139"},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495160463 1493948580 22791 (Name "openssl.org.") "\SO\204\187\243\214>\239\247\172\187\164\216\194\&9W\140\163\148\211\223\a\212b\FS\DC1\t%QpK\185gy\247\158\n\140\227\182\233\185\131\216\167\160\158\240FO\240\218\195\242\179\&7\138_?}\202\EOT\237\206\218B\156\161$\DC2\241;\246ZR)\r#3cL\STXj\223\225\ENQ\206r\135E\191\195yu\243\228:{\131i\FS\SOH~6\236\230\177\ESCS\246p\254\f1T\170\140\236\EM\241\134\171??g\228\134\229\140"},MsgRR {rrName = Name "openssl.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495160463 1493948580 44671 (Name "openssl.org.") "NC1\231I\223\244N\ENQ\252\206(D\NAK\251\160\214\153\v9\NAK\DLE\224\136\200Q\173\173\239q/6\211\132\n\r\189\201%:\252\205P\ACK\168\DC2bV\167\129:s\239\211k\235}'\211\202\189\197\136\179\189\239\176\210\211fj\237\173t\243n\EM\143\215\CAN\NAKS!\243\US\197\132S\\\182\182l\165\130\CAN\175\&0\176\196P9MpMo\232\166\211\173l\rm%gy:=H\168[M\163\&7I\194\252\SOH\225!g\140\&7\DC1\215?\253k#^\184~\157\SO\189f\250`q\232\225"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 48 8 2 172800 1496626622 1494031022 2746 (Name "stanford.edu.") "\141\184\176\RS^(\172\138\t+\a}2\149L\STX\EM\140\n~\181\227l\245?\183\231\216\196\187\NUL\SOH*\219}\212h\140\161nn\176-]\168\239\135kPk* \198+\199\211l\226}\b\135\207{\ENQ\205\130\228\239\v\181\224\242\192\&5r;\151x\172\236\a\171d\128\194\CAN4\129\174\254\146^\143(>\160H\224\219\190\DC3\230K\219\220L4~\153\r\212I\FS\180\&6\225\235A\136D|\FSd\128\145*\135O\129>\185\&8\191\200`\236\NULh/K8\DC1\185\183\US&\DC1\233\209\193WP\SUB\241\155\252\a\236nie\SOI\149\ACKWb\175s\EOT\181%\251\194ihV\143v\141\198\154\165\&7+L\160\v\216\DC27\216\138/i\239\172\a_8\191\FSh\132:\215^\222b\242\&2\t\190\ETX\203\237\133+\245\RSm\255,\SOH\203\239&\204\204\142*D\166f\b\151\167\255\246\208\FS\219\v\218N\128\198n\146\205\189\130\163-27"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 48 8 2 172800 1496626622 1494031022 27840 (Name "stanford.edu.") ")\195\155\185.\192_\148h\249|4\139\174\USNY\152N\128Xh\161\225\220\191\153~\171\GS\232\193\135f\133\212\SOH\202\204?I|\233\FS\229\203\211o/\155\201\223\157#P\141\&1\199\230\136\&4\SOHC\246\&7\ESC\161\158\249#v#i\184)aQ\166\133\228\183\159C\DC1sI\FS=c\166U\248a\199\145\220\165+\255p\245\254\209\143ZxE\207 \218\198\RS\173a\195'\143\168bj\195\144\167nP\205+\230"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 6 8 2 172800 1496846541 1494250941 27840 (Name "stanford.edu.") "\DC1x\SUB\204}_\150 \168j\228\134\183\b0\158dX\216\199M\213\191\181!rK\194\149\234\169t\SUB\215:\158xr\169\164\ETB\206\243\174\171y)\245\159\225F:\139Kva\247\177\NUL\EM\171-.#Rmzt\CAN}\222\177\147\138*Y\244$\141\t\254\179\226-Q@O\v\238\216\132\169&\208\202d\237 F\v<\178<\203\&6w\157e\211H\144\233I|Y\"N\209`\v;\159\163\225\SUBq\230\GS"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 172800 1496248135 1493654460 29979 (Name "stanford.edu.") "B\164\247\168\186g\148\174\254f\201n0KD\182\DEL\191\199\133%g\246\&1\128\147:\168\140Xl\224\169k\135\&4\f\DC1P\248\143\215\185\203\&3?\128\r\137h\168\FSR \160\")\202vx\ETBb\131\&12\234\235D\141\244\220\212*\224\188v[\205\183nE\193\216s\140\186\RSH\221\&1VK\224\200\US&\137\r\220P\242\196\130\&0\ETBRD^\137\231\186/\193d-\SUB\168\243O\177\CANN\EOT4\167\"\138."},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 172800 1496626500 1494031022 27840 (Name "stanford.edu.") "\182\190W\128@\251\&7\176\172\SOH4\235|\SI\220\173\227\GS\160\EMk`\FS\155\186Z\190\220\STX\DLE\\\234\253\251hQ'\165\SI\SYN\239\236\f\129\203\RS\247H\222g\198\220\172\&6\155\186$E\160y\163\160\DC2e\242|V\225P\196\164n_.S\177\237i\ETXI\170D\238)\222*x3\157\SOH\NAK$\245\FSl\200\141\GS\DC2\EM\134I\144\201\192\223*Y\212\n\219\147u\ACK\224\ETXA\DC1\206\234\217\253\181\152 \205\187W"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 99 8 2 1800 1496759744 1494166881 27840 (Name "stanford.edu.") "4\STX^MH\DC2\235r\162\169\210\197\138\244V\227:\224\196q\204\218\173(\DC3\232\172:n\252\132\148\190\166\209\239\187\223\199\148\179}\ETBYU\th\NAK\210\r\STX\194\DLED\148 i\147tm\161`\149\234@\212B\146\241\SUB\r\146\229\220\149\173o\190#\247\txA\226f\165\180<\225\&95\245\197\214\204\215O:\190D\147\201\SOH\132G\185MC\163\&1\208Me\203\205Vp\163\175X\224\253 \245c\NUL\247\251"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 16 8 2 1800 1495233106 1492638863 29979 (Name "stanford.edu.") "r\140\152\186\197\176\159\&7\217g\215\&5\155\252\ESC\230^|\195K\201_\181N\191\194\214\a\234m\SYN\"3\172&\b\218t\132\134Q\134\131T\229\253\193\240\250T\DC1;T\SOH@I\248\255\148\185<\v\149\177ZPT\NAK\225\171\&6\ao~e|\EM^\144\151\170-i$\209\180\206\&8b\154\218\174A\133\235P\t\183\194\190p\199\163A\245\DC3Fb\ENQS\221\249\DLE\230\222\171\148\196\vG\251Z\187v\200\131\166\249"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 16 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "D.\199\184\154\154s\223\200\139\195CN\200>\238\246\156v\185}\210\201\250>\177H\SOH\DC43\166\242\f\155Mi\246\246\&7G\130\231GzO\242\251\246\208\149\227\154H\142A\SUBB`\NAKG:=\196\238Zd\248\220\232\224\164\230\SOH:\254\202u\206iI\143\238\209]]\t\197\214\240Uw\226\191\169\152|\169r\139\219\212\251H\US\DC1R\ts\223 \bK\159j\US\195\132\148x/\SUB\244\216\197;q\130\154"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 29 8 2 1800 1496560398 1493966179 29979 (Name "stanford.edu.") "\SO\230 L/\255~\184\245\220VUp\a\244\CAN$[\163\223\242\SI\ETB\180\&5\206*\v\170\223NF6\209\167\211b\DC2\133xbL8\137v\f\198\243\136\&9\192K\155\142\151\&4O\161d\229z;\f\DC3p\223\147\254\223S\133W4:\156Z\231TOF\129[xPJ\244\224\EOT\176\253i\255C\SUB?\158\168@HS\169\178\240\143H\192\242"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 29 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\158H\SUB\\\r\SI\246\208\205\252c\167\240\&41\DC3\224\&5j\240\180\215\237\b\STXp\144#>\254\196\\9\134f\251\235\tS\162T\f\129\196\&66E\182\141\202:\202\153\EM\ETB2\NAK\161J\181\222\&8\252\&8\226\145\129\135p>\US\185U\214\SOH8\246\NUL\192\ETX\DC1\252\&0>\232\203\SUB\176\248\DC1[+\219zW|z\161\238J_\132\br}\178\&5\SO\207\192\251\247\152J-s\221\224!\241aQ\153y\"\177\141\210"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 1 8 2 1800 1496560398 1493966179 29979 (Name "stanford.edu.") "\DLEj,X\RS\CAN\SOH\162\157\222\203\202\192\&8\DC2\203\169\ETB\236`t\186,,\250QMq\NULcu\214\223\211RY\189h\EOT\163+u?\154F\188\216.\206\212\223Z\216\160C\163\":\191\151]\145\&6\162=\221\169=-\207\235'h\167\129\200@\tFl>UV\242\NULCC\187_nu\154\219\GS\f\165\128\163\193\DLE\217\215\226\ACK\158\FSY\144\220o\183$\192\184\203\248c}*/\212}\182\148N\246\232\&6"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 1 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\142\DC4\180&=/\GS\178\241\186\b\199\177\246\154\&8Y\240m\DC2\160\226,\213\139\182\190\164\197\188{\ACK\163+\228V\DC4H\143@\f2\SOH7\158\198Mr\206s\150\211\144\216qs\217\DC1Y\n\209\203\STX\US\137\154D\235\191\"f\151;\ACKK}\156\188\240\173\fnz\224j\184\215\145\186\220TYm\CAN\249\165\202\247#nf\200N\SUBM*(\154\181UQN\234}\230\212\FSN7\230^\203H\133\255\143\140="},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 28 8 2 1800 1496560398 1493966179 29979 (Name "stanford.edu.") "w\255\145C\SI]\247\147\190\254\147I`\198=\198\242\f\GS\153\183^g\236\238\191\142uLJ\222\186\246M\139\234#@\184\176\253\145\176\DC3\192O\GS3t\229\215\252\tC\225@\244t^u\134['\137\222\206\251\NUL\NAK\\\f\176\151\188\206B@\210\214$>GY\139\152\DC2s\181CB\143@\ENQ\EOT\195v\232^\161\GS\166\236\176\242Z\183\183\134\153\168\255\SUB\235a\177D\136\197@\135u\137u\246\137F\196\222"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 28 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\DC4\225\222\156\174r\231}*\162\190\SOo\DC2\163\212;i4\137OD\ENQf\135\179\FS{=;4\189|\n\164Rh+\217uo\135\198mRB9\223\DC3/\236B\222\229w#\170\252\ACK\217\a\182#\232\DELhb:\ESC\244!\SYN\130\200\174\173\213\186\218\223\202\171\FS\158\194\STX\205\236.@62\130\153\147\159\DC2\208B\SYN\188\148XB\217\SOH\195\EM2WF\235\&4\180+\231+ :\ACKO\198\133\130\128P\214~"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 15 8 2 1800 1496464420 1493870399 29979 (Name "stanford.edu.") "GH\218\173#\197\DEL\175`\213\ETXj\202R\132\170\&5\t\EOT\155_\165\239}\182\195S\143\GS\195\167\191\SUBN\237R&\213\ETX\221\207\US\242\230b{\234.|\214\STX\161,\150\138\a\159\202?]\217\n\175@bh\245\210\174\140\v\174\207;G\177B\189,\239\b\GSJ\159\t!\176.\209a\217!\146\n|\165Z\214/\209\235k%\US $\220r\215\196\151\216\CAN\ETB\212o i\216d\193\\\169,\NAK0%\247"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 15 8 2 1800 1496626500 1494031022 27840 (Name "stanford.edu.") "\208\141)]A\138{\180Va\181\160[A\187\224\EOT):w\226\149Si\168\171.U\fW@\172\203\195/\136\156\222\161c\r\209\201P\\B\SOH\196\199\186\146\170x\188t\NAK\250q\246\210v\213S_\NAK.\141\RSIU\141.\202?\172\236\188\145\EOT\223P\251\DC3/+\SI\139|W\NAK%\DC2\162`)I\146\144\151\157\EOT\210\200\206}\225\NAK\216\160\147\STX\f\150\241\GS\224\DLE\162\173\"\STXA6:>\148\184U"},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNSEC (Name "003004139284.stanford.edu.") (fromList [Type 1,Type 2,Type 6,Type 15,Type 16,Type 28,Type 29,Type 46,Type 47,Type 48,Type 99])},MsgRR {rrName = Name "stanford.edu.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 47 8 2 1800 1496624318 1494031186 27840 (Name "stanford.edu.") "i\218\201\NUL\144r\148\148.j\196H\245&'\138\152v\230@PO\226\188\192\210~\172}_K\168\150qO\198F&\128\220C\184\251\166\237\251\236\246.RvN\250\218\216\172T4\152b0\247\201\186\EOTg\185\&4ARl\153_s\242\212\136\f\135\191QBe\162Y\SIA\ENQ\173\233I\169\168(\SI\248\162\172'\130\197&\226\198\142<\ACK\vg\190Q\130\238n(T\235\&7\SOp^\194\187J\208\ENQ\181\151"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/9ebe8abd73d2cb61ac54d631a0305b61.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 46337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [MsgRR {rrName = Name "fastly.net.", rrClass = Class 1, rrTTL = TTL 29, rrData = RDataSOA (Name "ns1.fastly.net.") (Name "hostmaster.fastly.com.") 2016110301 3600 600 604800 30}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/a2878248b0e2a6d30b50bc67d11b5a21.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 40786, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 21, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataSOA (Name "a.gtld-servers.net.") (Name "nstld.verisign-grs.com.") 1494175849 1800 900 604800 86400},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataRRSIG 6 8 1 900 1494780649 1494171649 27302 (Name "com.") "y\199J)\ESCiLV\160\DC1y\146Y\202z\249\&6+\239\208\159\143\178\194V.u\EOT\189\220\137\&9X\ENQ\156\DC1\189\218\237v\193=\169nJ+3\133\SUB\240\151T\200\251'\146\209\DC3\aD\DC4\248q\173\216I\234\180\&4*gJ\231\170FV\212\186)\156\219\208\165>;\249V\161U\144\237\185\192\252\138\167\253\NAK%\209\180\240\174n+\239\128'CqB\182y\175\171\171\DC2\192:U\216%c\227\160Kw\215"},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "f.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "c.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "g.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "i.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "l.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "m.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "e.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "h.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "a.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "b.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "j.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "k.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataNS (Name "d.gtld-servers.net.")},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 172799, rrData = RDataRRSIG 2 8 1 172800 1494650866 1494041866 27302 (Name "com.") "P\166\202az\187\155\175\227w\195\202Hq2\163\228aU\231\144\203\159\196A\146!\172\USvn\193;n\170F\185\255\170\169=\235\CAN\181%\199\"\243\254\159\205\140\158\&5{p1\ETB\231vb\fv\209\203\179\DC2\132(v\140\147\222\"\181NXB\202\246s\242\n~\163\r\SUB\EOT\\\DC2\179"},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataDNSKEY 256 3 8 "\SOH\ETX\171\205/\235\a\130\203\ESC\EM\135\129\189e\EOT\229j\140\133~-\233\161\248\221?\181\200 ;m\173#\153\SUB\196\&0\192R\198]n\177Tt\214\224_\184V\141\215\154\145\209\FS\238e\244\ETX1\157\128\STX\135\a\184[\244 \254\172\&8\225'\142}\DC4\174\161$\230\217\226\149RG\143\EOT&\130@1'\a;\197/\229w\255\141Z\NAK=\160\205\207\v{\ESC\CAN\NUL\139w\175\214T\237\150J\135\229\231\132\152\130\233\171"},MsgRR {rrName = Name "com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataDNSKEY 257 3 8 "\SOH\ETX\195\206WM\152\203\217\NAK~\rp\210t\184I\202\SO\SO\237\154\255\197\220\204\144GIi\ACKe\\5\203\b\179\245.\RSj\245\&6\139>z\140]Ux\"\EOT\194#\153\204\238C6\153r\GS\163B8-\EOT\249\185b\194\227\223\249Y}'\166\242\f\SI\135\&9\225U\EOT\149\212\172<\SOH\193}\SO\205\DC1E\EOT_\145\ACK\131\158\253\228\196\&8\238\141\180\&4\133\GSc\234\DC1\234tl\220\233\&1\138s \204\168\129\239\135\222\203\141\139\216g\160\228\EOT\244\179\208\199\247_\243\228\176k\210.\DC2\132\240\157\139\176^\144M\191~w\170\USO\247\251\137Hu\204g\186\187{d\FS\166l\188\156\138S\140[\174\131\230p\214\US\231C!P\169h0\198\195W\179\232\157\243ZX\b?\246Kh;gA\184\174\195xou\157\143\137\205\239|\213\254\192\248#`m\ESC\247=\219/!\225\217)\195\243E\ETX/\128\228\162\EOTL\178cR\RS}\228I\183r\203\150?\SUB\189"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/a48ae1f9104e3732d4c5bd183c2a9ae1.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 15280, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 147, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b0beddd4cdcdc372a58192f3ae7264e2.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 1949, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 15, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x17647aaf)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x17603435)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0xbfefd5c5)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x6828d323)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataA (IPv4 0x682bc3fb)},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns1.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns2.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns3.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 84943, rrData = RDataNS (Name "ns4.msft.net.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataSOA (Name "ns1.msft.net.") (Name "msnhst.microsoft.com.") 2017050703 7200 600 2419200 3600},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataMX 10 (Name "microsoft-com.mail.protection.outlook.com.")},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="]},MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 2143, rrData = RDataTXT ["docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"]}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b127444bb25b3d2947e972d3ba0c26dd.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 60351, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "_mirrors.hackage.haskell.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "_mirrors.hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 3788, rrData = RDataHINFO "ANY obsoleted" "See draft-ietf-dnsop-refuse-any"}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b28818a1324f6e327b4c31668e0e6d9d.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 26541, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "microsoft.com.", rrClass = Class 1, rrTTL = TTL 1357, rrData = RDataMX 10 (Name "microsoft-com.mail.protection.outlook.com.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b473fc47ff9ce44a72ef479cbb6fa861.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 17, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "google.com.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xacd913ce)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xacd913ce)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0xacd913ce)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2a001450400e0808 0x200e)},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 50 (Name "alt4.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 10 (Name "aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataSOA (Name "ns4.google.com.") (Name "dns-admin.google.com.") 155321650 900 900 1800 60},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns4.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 40 (Name "alt3.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 20 (Name "alt1.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataMX 30 (Name "alt2.aspmx.l.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns3.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns2.google.com.")},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataCAA 0 "issue" "pki.goog"},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataCAA 0 "issue" "symantec.com"},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataTXT ["v=spf1 include:_spf.google.com ~all"]},MsgRR {rrName = Name "google.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "ns1.google.com.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b64d9926db52e425c8747c143b9266c1.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b64d9926db52e425c8747c143b9266c1.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b64d9926db52e425c8747c143b9266c1.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b64d9926db52e425c8747c143b9266c1.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b64d9926db52e425c8747c143b9266c1.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b64d9926db52e425c8747c143b9266c1.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 60952, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = True, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "hackage.haskell.org.") (Type 5) (Class 1)], msgAN = [MsgRR {rrName = Name "hackage.haskell.org.", rrClass = Class 1, rrTTL = TTL 148, rrData = RDataCNAME (Name "j.global-ssl.fastly.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b6d7e514db902da80c8a8e124673139b.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b6d7e514db902da80c8a8e124673139b.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b6d7e514db902da80c8a8e124673139b.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b6d7e514db902da80c8a8e124673139b.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b6d7e514db902da80c8a8e124673139b.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b6d7e514db902da80c8a8e124673139b.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 56763, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.", rrClass = Class 1, rrTTL = TTL 35622, rrData = RDataA (IPv4 0x5e7e2a32)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 4096, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b6e25f429f7bfb60a8a3b473e8d2b6a2.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 31, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "debian.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataNSEC3PARAM 1 0 16 "\SO\192\162\220\222"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataRRSIG 51 8 2 0 1497614849 1494156550 53598 (Name "debian.org.") "\186\DLE\205\fEe\vUb)\EM\156\201g\236\165r\226\178\136\STX~\US\v*Y\150\196\253\217c\236\&0fMO\157\184Q\227\170\CAN\190q\190\252\241\220d\230\249\175.\EOTw\f-n\164G\223\159P\149T\152p\217\147\238\178\208\147N\220\167c\224\212\138dI\169\217m\167\187\196\144\206G\224D\198\205d?]V|\134\226\r[n/\198\150\228G\198\v[q\FS\221`\223\RSP\218\DC4\142\138\"n\167\176{*S\248\\\129\141Z{a\152k\163b~\216\133~*\175\235IP\242\173\156\142ZOX\229\174\157\187\\\224\212\216~r\DEL\158|\135\NAK\135\130\233C\217\155bU\128\DEL>\177\150\161-u\177\227\191"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataSOA (Name "denis.debian.org.") (Name "hostmaster.debian.org.") 2017050804 1800 600 1814400 600},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataRRSIG 2 8 2 28800 1496661232 1493203448 53598 (Name "debian.org.") "\203\GS`3I\r\228\EM{\ACKZ\SUB\233\185\&2\154\159!\194\183\222}5\143Sz\239\240\186\240\129\251R\147\215\251\167 @\DC1H\227\207\140\215y\236\202\208+\NULi\168q\183\NAK\r\DEL\159~x\GS\137\150&\NAKt\140\a2\GS4\SO:\174s\DC3\DLEHO_\v\147.x{8\156\214\SO\128\200\163\158\149/\175\190[B\149\175^\229\ESC\NAK\164\216\247D\243\t\SOP!?\255\DC4\ACKej\145\176\f\EOT|\ACK\166w\233\194l@Gp\188\208\238_\179\219\&0\CAN4\229\GS\148\196\135\200r\234\175\&3\rB\211\184R/i\150\SOHA\207\222iri\177K\242\NAKd\241\230-\STX\DC1Eh\222\199\250\157$7\SUBf\179\149\150"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 1 8 2 300 1497698216 1494238616 53598 (Name "debian.org.") "'\233%\DC3)/\188\165\236\&4\DC2f\231Q\231J\132\178\142\222\232\182\133\DEL6\220%\212\ACK\247\184\167\vb\175\CAN\232\162\170\190FOM\RS\f\235_\144W\ETB\215\158\244\223\vJ\210=\148d\142|\220\215\&9\220\204\233F4~=9J$\a}\177p\148\255\223AIP@\137\DLE\203;>i:\250\SUB\167\159\164Z]\149\150P\US/\157\198\181\ETX\165N\DC3\197\235\140\139I\US\238\184\193M\180\132\141{\213R\251\219&8\252"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataRRSIG 15 8 2 28800 1496661232 1493203448 53598 (Name "debian.org.") "\135\164\225\200\246u(\DC1\129\NAK\224\a\141\205\&0\206\201\221\156f[\ENQ9}\\\236\157+\SYN\128\170\197f\ETB\195Z\169\209\240\189\185\&8:\EM\209\219\128k0r\\Xc\NAKNSB\233\221\241\174\139\135\253\246\130PW\129\\\142\198\223\DLEpL\NUL\188z\252\169(\226kzu\225)\238\147n\227c\190V\236\249\213\182b|@\255\169H\167\128\145\184[\220\155K\238U\235\190\tJ\ETB\175[Ua\134G2\134\225\v6mx\179$\243\186HSK]\203\"\158\167r\SO\174I\f9\214o\170J\185\128\149y\vo\175\211Py\DC3\DC4\175\US\237\130\&1sE\229bt&o~\SUB\196\134\243\DLE\231\n\253\234A\180\175"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 28 8 2 300 1497698216 1494238616 53598 (Name "debian.org.") "h;I\216\162\211\209\224\SOHa+\"\a\222\245\241\SIL\134-\225\200\170\&0\149\148*\234\208~4UG\135M\DC1\rK\US\181M\158D\220+\205\215q\229M?\199x\250 5\STX_}\167\&3\207\214\DEL\ETBAY\216=\252D\SO\174y\142\147\185s\STX\135\SO7^V:\160\153H/\151 \220\146\155\132\&5\158\143\184\164h\SUB\130\176\CAN\a}2\196\162\a\SYN\223f\130\240\211~b4-\252\151\223\217\DC2\223{z{s\134\251\171\ESCG\216\164\&6\223\211g\152\218\241\&88\SUB?\213\133\218@\175\255\EM\192\238\147\&8af\242\DC4B\DC3\220\140#\153\174\182\166\ETX\177%\DC4\f\240BC\195qL\228\196=\DC1\137\251\DC17"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 35 8 2 3600 1496661232 1493203448 53598 (Name "debian.org.") "\128\242P\211\136<\187\164D\208\213\195-\130\230q\153\156\180\161\\?)^\128\\\247\200\224i4\NULu\230|\t\215\DC4\149\254\ETB\192-\186\173tw\213\DC3\184\228\223:\202\&3\208 \179\165\161*\254&\149\138S\192.E\218\EMp\156\\\165\b\"\179v\231\132\188\222\DEL*\EM\155U\US#@\ENQh\241K.\223\&6\131\162\226o\203!\152$;\"\128\DC1B\231\187HZ\209\&3/\208\135?y\n\178c\177OX\CAN\202\161)\161\196\245\199\DC16*\210\248\174Jg#\247\161\145\177\&1A\243\212\200r\204\142\&7\165\GSl\134+-\ETX\129L\162-\154\207\SO5\248\145\252\162\v\149\169Z\154\240\DC4\242}i\182\216\187CL"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 6 8 2 3600 1497698216 1494238616 53598 (Name "debian.org.") "\141G\148\&8Ru\215~\167\220\201\a\234\142\f\136?p\174d\136E\130\135\136\&7vA\212\"x \188\189\SYN\166x\158y\236\DC18\163\241\217B\169;\200IUF\136\138\253A2Fq\150M:\174C/Y\GS\194XD\135\216\140P\DC1U\187\STX\163DM\182\205\243\185\170\165C\209,bp\195\246\236\162)\180\209\ETX\216\232\219\241<\219\158S\EOT+$C\250\174\b\237\155:\233\177@\208F\192\198\131\132zsO9@\f\247\138\SOHjM>ajU\179\t\n\222\203b\DLE\253\224\&4\240\DC4N\146ua\148\208\185\183:}\156\148\153\171\ve\180\SI\229\193\140\232\SOH\182<#?P\STX\164#3\167.\163\143\&9\205"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RDataRRSIG 65534 8 2 0 1497615664 1494156551 53598 (Name "debian.org.") "\194\&5v\DEL\182\184\138\201\232=\183\ETB~4\172\DEL\168B`e\SUB\128\222\190L\141\154\151\236\\\176/\NUL\209a*:c\145`\164\t\179l\206\225\162\RS\208f\159S\RSLz\182\n\a\186\207\208$#>+\150\&5\151\129\220L&\173\188\141BA\SOH\130\136\&6\DC1\141\220 \134~\149\144=\229\v*\246m\SI\DC2\207`\180\237\SO\166\167\226y\186\139\182."},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RData (Type 65534) "\b\EMW\NUL\SOH"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 0, rrData = RData (Type 65534) "\b\209^\NUL\SOH"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\247\254\167,h*\ACK\241\143,\SYN)w\190\177I(\202\ACKiV\246nn\SUBM\bu_\239n\194\193\236\214is\140\SUB\SO\182/?\162\140\b\182\187\179\rD\223\139&\214\165y\236\r0\SOH\137\249\252z\EM9\247\165(\EM\143\">'\230\GSX?\188t\228r\185\168\&5\173\SI\180\226/\203\140\154D\180\239\207\&4\234\ETX\236\252\245\NAK\tK\199\138\243\NAK\177fwG^\253S\211\192B\186\151W\252\SYN\199\206\&4\FS\243M"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\151\229\ETB\218\252+\173\&2\GSK\140\207\236\249\f\n\187M\129\160\216\169\186\152p\n\CAN\161\204}\153\207\241\ETBr\128WZ\237\CAN\245\151\184\&7\240\226\US^\243\&0\133\140\141\231 \139z\209\150\227x\182\191V\187e\SYN\169#\162W\222\157K\DC4\234mJ\172\130#4\146\f\175\191\255 \191\251\182\244A\\\134V\197\218\186\194\NAK\150L\173B#\222\242-\209\SIP\250b\DC1\231/\151\a\252\SYNC\160\DLE\US<\251liLSc\SOH\185,\247\218\143\239\181:\243\164\191I\165\157\184\177\134\187O\150\179GE\ESCaU02qR!\199R\172\STXita\157w4h\219\218\241\206\210v[\165\193}:\STX\DLE5\157\166\144\EOT\194\247\231\164\191-\222\186\\\144\222=\224o\230\194J\189\211\160\241\240\242\163\167\238\f\SOH\238L\159\DC4\132\208\171F$\161\169\GS\173\224w\167/\191\142\146wY\235\245\231\&1<\252\234\148-\NUL\137\223y"},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNAPTR 10 0 "s" "SIPS+D2T" "" (Name "_sips._tcp.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200104f80001000c 0x15)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200106101908b000 0x1480014)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x200141c810000021 0x210004)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataAAAA (IPv6 0x2605bc8030100b00 0xdeb01660202)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataMX 0 (Name "muffat.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataMX 0 (Name "mailly.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x599e704)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x801f003e)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x8259940e)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x8cd3a6ca)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataA (IPv4 0x9514040f)},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataNS (Name "dnsnode.debian.org.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataNS (Name "sec1.rcode0.net.")},MsgRR {rrName = Name "debian.org.", rrClass = Class 1, rrTTL = TTL 28799, rrData = RDataNS (Name "sec2.rcode0.net.")}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b90b636aee4f847240da4e2606eb64af.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b90b636aee4f847240da4e2606eb64af.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b90b636aee4f847240da4e2606eb64af.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b90b636aee4f847240da4e2606eb64af.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/b90b636aee4f847240da4e2606eb64af.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/b90b636aee4f847240da4e2606eb64af.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 8824, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com.", rrClass = Class 1, rrTTL = TTL 35774, rrData = RDataA (IPv4 0x5e7e2a32)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/bc73346b31d530d2fd1c40100e0abdb3.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 49467, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3376, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 17605, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 885, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154963 1000 1000 1000 1800}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/bd9f84e89a040ca3c405c8b0c61e7b95.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 38134, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.", rrClass = Class 1, rrTTL = TTL 899, rrData = RDataPTR (Name "ghc.haskell.org.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c1643eda6cc3d3ed3cee45c25027e5f4.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 18218, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3478, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 19714, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 890, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")},MsgRR {rrName = Name "e1863.dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 10, rrData = RDataA (IPv4 0x5c7ab450)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c19a30769d1fac0f4bc2e4e20681ef4e.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 1121, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.google.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 129, rrData = RDataA (IPv4 0xd83ac9e4)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c2b9983a237cc1d0085a7579dd54f189.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 30614, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.google.com.") (Type 28) (Class 1)], msgAN = [MsgRR {rrName = Name "www.google.com.", rrClass = Class 1, rrTTL = TTL 186, rrData = RDataAAAA (IPv6 0x2a00145040070816 0x2004)}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c4506200f514568ec9a2d42663a1e77d.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c4506200f514568ec9a2d42663a1e77d.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/c4506200f514568ec9a2d42663a1e77d.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 31337, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 25, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "ietf.org.") (Type 255) (Class 1)], msgAN = [MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataSOA (Name "ns0.amsl.com.") (Name "glen.amsl.com.") 1200000348 1800 1800 604800 1800},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 6 5 2 1800 1524762969 1493223555 40452 (Name "ietf.org.") "P\143\164/\211\&9Cmr\144#p\138\f\131\ESC\220\RS\DC2\153v\209\SOHv\SOL\153\223\227\ETB\186\NAK\180\&9\189A\138}\160]\220!\212\244\t\131\DC2\176ag\RS_\136\250\233\159\&9\250\239\EM;\NAK_\156\171\212duq\194\211\211\207m0t\194;\246\222^m\249\189\252\131\210\189\175\ACK\144\199%\179J\206\190\139\ACK\220\230Y&\211&b\202'\227t\152\SYN\184\173\254\247\235X\243\197\&7\174\205\DELD<\231Gt\215o\228\ENQ\164\ESC\192~\166y1\232>n\202\217\252>\200\229\233\133\&7&\180\138\134\ETX\160\195\226\\\198\232\253\250@\154G\NUL\DC4\175\197\145\250\USa\143\DEL\149,\160._\DC2\162\216\242E\174:\"\236;\255\154\147\219iF\"\245e\236\&6\134$a\241c\217\DC1\193c\182O\160\238XL\203\230K\228\DC1\135\135\&7`Y\248\EOT2\156.\146\SUB\158\&4+\238\STX\142\182\164\FS\ACK&\143\186*F:@\222U\149"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.mia1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.ams1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns0.amsl.com.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.sea1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.yyz1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNS (Name "ns1.hkg1.afilias-nst.info.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 2 5 2 1800 1524763120 1493223555 40452 (Name "ietf.org.") "\196-\224\241\235A5\213\186+\136\SUB\201\171\186f6Y\163\US\GS\211\152@R\154l\166\FS|\208\246F\251\185\180\SI\ETBR\130\131~\200\214\RSl\144\157\a\137\216\236\&0\ETX`\188\DC2\137t\ENQ\188A\255\144Uj\179\151\205\SO\197Kw6\169\157\133i\EMWA\GSo\135\224HP\US\174\243 \219\208\a\248\187\220\218\240\ACK!\132R\243\150\&2P\EM\180\161\ESC\179%\ETXiBx\149\160\156\155J\SOH\239f\201\213)\173\240qD:&)\146Kf\202\195\b\175\161O\220\DC2\213\\*\209\200\EM\228\173\208\163q\154\EM^s\138\191S9\191\232\170\181\232 \131\227\131\151e?k\DC1\173\205\f\197/\183y<\ETB\205\170\244\143\133\232l[\149\&1\SYN\202s\220\&3\135\173+\STX\136z)=d\226>\188\139\151T_?\USe+\EOT\196\SYNC\196\128\144Du~9A\136*\154\219V\DC2\195@\DEL\209>\135\182\150\131\149~\132a\141\138"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataA (IPv4 0x41fc62c)},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 1 5 2 1800 1524763086 1493223555 40452 (Name "ietf.org.") "]t\133\144\&7}\NULV^\200\165\FS\187[u:<_\238\172\&6\217(}\226\b]\151}ve\180\186)5\255\FS\ESCj?>_\202\226\210\185\165\202\128\v\173\204kn\SUB\242qm\\\203Ce'\242\222\228r\223\243;\ESCa\DC3\NUL\165\&6wAf\196\"\253\200\231\198\140\200a\227\&6K=?\v\FS\162\245lB\161\160\\\ETX\f\r\176M\218\134\US\176Fi\208\174\209\202P\160\DLEC*\200\&8\191ou\190\DC3\226\v\156r\144\DLE\171\&2r=\187\157\v\184\169\235\163\ENQm\242U\f v\aOmR\142\227K\v_\n\239\249\177\161\217\134\&0\250\208\221\130\DC3\136\189\139k\228\210.em,M&\237vU\227\214\193\US\148|\198\DC4|\128,\177}\133\144^+\148\143\&6\197B\ACK[\204\DC3`\147\134U\219\170#\132\199\183\196\154\179ZGQ\247)l\187\&2\SYNf\237\202p\241\253\230\145\251j\NUL\224\146=\ENQf\SI\180"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataMX 0 (Name "mail.ietf.org.")},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 15 5 2 1800 1524763100 1493223555 40452 (Name "ietf.org.") "\ENQ>\186\\\164\202\156\DC1\201\251i\187\244\236\&3\189\195?,4t(\165r\\p\221\195f_\186$8M\b\147L.n`v\248\167\&5\220\240\156\179\&9m\242<2/\203\229\168}2$k\231\NUL\247R\\\155K\186\134U\ETBg\165g\196\190|#\US\176\ACK\192\242\ETB,\FS\151\231\217\NAK\143z\194j\138\&8s\164\US\252\247i0\RS\201d\DC2\170}\204;\NUL\187\ETX\249\DC4\219\165zg\DC3\241\201\223mp\215Yb\176\242;w\137ZV\193\192\243\211\SO\157\235y<\DC2;<16n\190\202\147\152\133\206\144\203]\148\204\224\172X^\211\200\192\225\223\128M\169\192<\253W;E\241\EM\253W\173\225$\226\159\t\195\200\222^\242a\196!\176x\149l\251\141\227ya8:\197\STX0\238\230\DC2\DLE\187\175\DEL\209\188E\133\131\179(\147\214\130ta\ETBK\188uQ\178\199/\228\a.\NAKi\149\172\NAK-^au\ACK.\215j"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataTXT ["v=spf1 ip4:12.22.58.0/24 ip4:64.170.98.0/24 ip4:4.31.198.32/27 ip4:209.208.19.192/27 ip4:72.167.123.204 ip6:2001:1890:123a::/56 ip6:2001:1890:126c::/56 ip6:2001:1900:3001:0011::0/64 ip6:2607:f170:8000:1500::0/64 -all"]},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 16 5 2 1800 1524763104 1493223555 40452 (Name "ietf.org.") "\136\157Fpx\200\192\178J\227\"cT\254\180\217r{\216\228AQ\EMsM\253 \180,\248&\149\220\196:l\153\202+\SYN\224\CAN\156=\SO\174\241\168\254\215\181\180\194N+\171\197e\156\NULE\141EMPg\247[\DC3\202\SUB\248\180\EM\144K\SI\210\240\129hhi+G\204\SO\152A\221_F:\FS\253}\DEL|\141pk&\GS\160\130\254i9M\STX\162\231&\142\222fW\210A\149\221y\185{\GS\156\237!\212NI\DC2\144\226\197\146\vJ)\212\134l\SO\243\RSu\178'\181y\NAK#\224<\233\230\186^\253\222\208\215\SYN6\151]oI\189\172@\DC1\129\195ga\221\182\ENQ\189\164\244\191\173\163\247gCl\131\177\196\164\226\184D\229@\132s\131\161\162w\165\"2\164\168;\135\199\225\251\&7&\134\194\177g\153\rJ6\164\"\220\136\160g\207\129\184\200\167\ESC:\238\EM\154y\177\&2\242\246\238\149\228\DC29R/\211`vs"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataAAAA (IPv6 0x2001190030010011 0x2c)},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 28 5 2 1800 1524763044 1493223555 40452 (Name "ietf.org.") "F\221\216\166\163C\171\ESC\210N\225! \155%4%@\ENQ\251\170\179\SYN\187UJiQ\214\&6\169\b2\198qz\145gY\240^k\232\247$\237\&9\156D\169\CAN<\138\128O\174\171j\207\NAK\129\254NH`nlY\SUB\NUL\238\206\176\156\aN(\186\&9\199\198C\140g\EOT\179\210\232Tq\203)\226\160\218\163\&9\203\NUL\133\223\NUL4\239\181\133\DELgh\143o\146\157H\DLE\NUL\168yJwc2\201\"\254\230q\201\bei\185\197\230\156\141\GS;\159\204\176\"\242\ETB\210T\217\254\236#-'l\187t/#'\236\183 \174/\181\200\160\198\SYN\fw\153\244\207?F\v\NUL|,Q\133\176\185\212]\207\ETB\DC29\148j\189\229\229\177\DC3\219|\244\146\215\STX\208\DC4C+\139\192\"\130\150\192\149\175\188\196|o,\148%\154\v\135\224\172ko\228\v\233`~#\151p\128\147\134\170\235\133\208Ekl\245r7*t\254\193=?\180"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataNSEC (Name "ietf1._domainkey.ietf.org.") (fromList [Type 1,Type 2,Type 6,Type 15,Type 16,Type 28,Type 46,Type 47,Type 48,Type 99])},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 47 5 2 1800 1524763055 1493223555 40452 (Name "ietf.org.") "\ENQ\218r\154>Lin;\254\238F\NAK\ACK6\r\184-\192\237[\STX\250\184\&8\232\202\154b\t\204\129;\221\NUL\DEL\v*!8\178\169\201\ENQ_\199Yn\162\137\177$\a\159M[,\202U\DEL\155P c\254N\197\&7\233Y>)f\224}D\142\146\166\191\136\226)x\168\237I\133\194\233L\144c\DELU\185\255\158\DC2d\187\155\211~c\186\&7\169#\233\&0r\DC1\SYNg\181\196\179\141}V\ENQ\142\SUBW\165C\135\ETX\EMV\US\234%\243f3\213D\141\&1\DC2\195%\SYN\195\253\ENQ\239Q\a\245Z\RS\159'\223\159f)\185x\168\GS\a\195q@8?\190\150^\215$\140$\221\211\EM\144\246MK\vp\172+\158hE\135\254\b\164e\175\&1q\SYN\205\146|\178u\255\198\155\&8[\237\247\211\210\253\157A\222\FS\FSkHv\156\220\172!p7pv\174s\153\248\f\169BVY?\246\129b\250\255\DC4\174\238\EM\243h\237:`\146"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataDNSKEY 256 3 5 "\ETX\SOH\NUL\SOH\208\196\t\168\199i8\223J\131Sc\159\SYNp\SYN\161\212\FSO)R\a\a>\b|\184\223\168\203\226\186n%\128\171Jd\183\189\236\&8\t\231\243P\172\209\ACK\EM\t\171\233\242\175R>\187q\250\217R\136\217\217\193\145\139\&5a\130C\170g\219\FSi5W6\229\203\&3\148\240\237U\142T\135\RSyp.\184}\166<\136\132W\163!%\133,[\167o\152\219\t\225|\STX\128\216+\160\t\151\134\131\EOT\137a#\EOT\US\176\141\134P\228kY\FS\DC1JUp\STXId\226\n\215]\GS\203\158\&9\228\149>.V\US\222\NAK\150\230\225\GS\248\178\180\211\217.\179\155\133@\135O\169\&4\180\209:\166\DC2\232\RSu\214S\238\175\166\198)\207\161\161\&3\SI\209\244\DC1q[\147\221\170\166\195\159' B\201PZ\fq\191\193u\DC2\224o$\222\186\177e\159\ESC"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 48 5 2 1800 1524762971 1493223555 40452 (Name "ietf.org.") "R\220uL\178\139\238\216\181br\231\GS\128\250\205\243\&9d\165\185;Q\151\&6+n\a\148\169\152Fy(\244R\FS\131\ACK\137\229\167\199>R\RS\192\238\NAK\215\241m\"\200\174\132u\FS0C\DC4]\249\244\198.\138\221[K\164\SOW\SI\SYNcV\146\196\229#4\173\216\201^\128~\tHcSY\131\SI\229\238\191\GS\161\180zV\167]\216\216\163\CANb\211\ETX\\\SYN\234%\152\&4\231q\200H\129\245\253\224S\248\no\GS\195D\149&\ENQ\152HRi`\181\228\189\214\203\176\CAN\209&,o\239\222p\147\203\213o\163\179d\161\229\132\170\r\ENQ\251S\168M\232G\151\189\206\&7M';\SI\201\136\DLE\168\212m\200c\210-H\n0\ESC\157W\DELg\NUL\240\"XE\228\243W\236\170P\202\167U\ETXm\166\&9\162r\151\134\223\179\DC3=T\STX\158\180\226`\131S\DC3\235\199;\128B\149H\170\134\ENQ\253\156\166\141\236Z\161\228\186\175\DC3"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 48 5 2 1800 1524763006 1493223555 45586 (Name "ietf.org.") "X\165A\218{\a\DC1\163\238\178 =\153\220\241\150\231\ETX\164\230\FS\199\233\r\218\t5\ETX$\182B/^\215\235L\175GP\133\153\230#\204(\179-\243/\188\ETX\192=\148J\n)\160\a\247J\251\133\209\223-f\175\DEL\211\227\170\197\SOH\ACKo8\247_\DEL\189Gjf\251X\166\221\207\&7b\142k\208-g|\SO\169\128\f\221\139\130\181\128\185o\220g\151\219B%\204\v\237\129\&7\249\&4\149\217\205\209\160'=\211 \187\152i\213\213\192H\178\153\&2\161\181\128\189y\132e\136\DEL\235\244\180\207U\245C\128\207\230lf\187\196\128\&8\250\SUB\177\224^k\ETX\FS\195\&79M?\189\NUL\161\178\&5\183\228\DC3Bxy\244\221\153L\145\154~0\173o\130\160\155\213\254\&3\ENQf^\255\157\188\&1%\146\US|\232\SOH\n~\ESC\239d'=\245\&7\206\a\ETX\SO\245Q\ESC\227\242Vj2\182\175!\206\223%\231\ENQ\172`\222\b\209\EM\234\172\&2"},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataSPF ["v=spf1 ip4:12.22.58.0/24 ip4:64.170.98.0/24 ip4:4.31.198.32/27 ip4:209.208.19.192/27 ip4:72.167.123.204 ip6:2001:1890:123a::/56 ip6:2001:1890:126c::/56 ip6:2001:1900:3001:0011::0/64 ip6:2607:f170:8000:1500::0/64 -all"]},MsgRR {rrName = Name "ietf.org.", rrClass = Class 1, rrTTL = TTL 1799, rrData = RDataRRSIG 99 5 2 1800 1524762978 1493223555 40452 (Name "ietf.org.") "\b\DC2k\193\248\172\212\218\130l\131\247\202O\248\132\254\237\158\178\180\167\229X\184\v<<7\152\233\178v\172\220\161\158\171\232\254\165\NUL\147\FS\STX\251\&1\189Mc\230\194\197\192y\140\221tc\SYN\USC_>T:\STXF\135Z\225\&8\130\FS\ETBhZ\178Hc\GSS\171g*t}\255\137\146\217>@\230\232\141\176\SI\185\202\202Ad\EOTA\133\240Vk\204^7\212\158\&9\135\CAN\226\188!\145\129\132\213%\234\207\219\tTsN\135\178\SYN56\DC3q\216\192>,\197\194K\198\229e\132\231\b\232("},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataNSEC (Name "3D-Printing.nasa.gov.") (fromList [Type 1,Type 2,Type 6,Type 15,Type 16,Type 46,Type 47,Type 48])},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 299, rrData = RDataRRSIG 47 8 2 300 1496749007 1494154805 34113 (Name "nasa.gov.") "\bG\199@\n~\164\158\155\214\EMa\130\134\160\184C\250\147\156z\197q\165\249\DC3\155\250\b\NAK\EOT>%%3\132%[\n\179\137vh\135\205]\SI[\187\181@\190\a\168\178qW\252\245\229F\177Wt\188\170g\133\211A\236\154\SOH\159V\DC4o\NULA\EM\200^\182+9\170tR\220\&5\236\152em\222\161Y\159\&7c\211y\162R\228y\128,dz\156#jR\168&\214^\166\147\227\223\170\135\131b\156\226"},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\188\&6\253\240\DEL\139M\ESC\154>W\159._q=\206\151\215\162\"\182M\218\218\rj\171\188A\172\197\170\213k\171\238\SO\206a\171\145\144\185ZH\235\212\145\&7SN\133\156]6R\DEL\141\216\236g\128\222\159G\ESC\205z\"A\176]\216\&35hB\221\187\248Qd\146\ETBt\221\151\168\EMg\159\156x\155\218\148\&8\143DC8\223\136:3\202=\226\198=\157)b\169\172R\128\175\DC4V\216\232\192\232\EOT\231\203"},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\193\145\233\ETB\182\"R\233g\EM2\179\191\171\161h\159\143*\247\169q/\142&\SYNM\202V\224\SO\221\133\178U\223\DC3\175\158t9\220\128\ENQP=\FS\209,\133\130\159s\227\136e\234\195\136\ACK\140H\ETB\231\176\DEL\147\252c\SOF\FS\151\174\172v\140\&8U\139\137y\228\b\EOT4\DC2\136\174\255F\205\SO9\187a\190Q\ETB\234\182\DEL\ETBm\NAK\209y[:k\150\161\DC4>\134\131\ETB\245\167\199\134\226\244\222\214G\222D\129&\DC4\195\NAK\RSr\188\174\195D\217\129A\236 \DC4\NUL\200qzAwt\210\180\ETB\160|/,\167\"\193\137\188\154\185\165\DC2^]l_Qq\ETB\166\242 P\154\208Zm\SYN\\\229@\229\154F\229T@\254\&8\220\134t\237\156\220|\SOc\EOT\239\SI\240\FS\\']\185\157L\190\206\133\130\208\162\143\220\156\180\152y\US~\STX\207\EMA\173\235\ENQ+8\DC1#\236\ETB\162\161\"\f\SOH\168\177\180\201\138\t\STXv\133"},MsgRR {rrName = Name "nasa.gov.", rrClass = Class 1, rrTTL = TTL 599, rrData = RDataRRSIG 48 8 2 600 1496750400 1494154800 34113 (Name "nasa.gov.") "R\166/W\NAK\SYN\253e\153\EM\142\201m\170\246\205g%\230\\I-\134\251T\170\228\154\221P1\DC1\NUL\223\234\245\171\243\190:\225\133\218\&4\247\195\ACKU\180\NAKJ\147\140x\155O\250VK\155\205\201\&3\137\&1=\180\153\170A\229f\SO\ENQ\164\SOU\221\\\178RM\DEL8\217\146\245D\161r\182\140[6\247\164,qX\202\247X\173\193x\222\210!9i6n \192 \196@u\177fi&4\209b=\225\196\248\160\223\nT\250\131\254\183\254\221\202\RS\140|\134\171\252\EM,\225\234\199\247\DEL\149/\189\152\214\215\218\186\240\&2[P\152\208\180\US"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataNSEC (Name "www.example.com.") (fromList [Type 1,Type 2,Type 6,Type 16,Type 28,Type 46,Type 47,Type 48])},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 2 8 2 86400 1495006082 1493148678 21214 (Name "example.com.") "\a\223\141iM\f\bo\160\139\192`\255Y.\166VO\178\DLED\161|8\STXB\252\SYN*\164\129\ESC5\DC3\v\\ZV?U\216\135\DC3\f\248M#\SYN\142\164\143\217X\233\ESC\159\NUL_\DC4n(\157w\FS~\145R\178\166\229J(\159\209\184|\251\220\238\237SO\139\209\147\220\&0Xv\165\201\GSH \251\&2\135\154J\194\ETX\199' \RS\132bb\243\148E\168\158\172\US\228\ACK\241\174\169\201\239\225\243\&6\DC1\255](\153\161"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "a.iana-servers.net.")},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataNS (Name "b.iana-servers.net.")},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 28 8 2 86400 1494925308 1493148678 21214 (Name "example.com.") "\DC4\224\&0\233w\r&>\182\142\167\220\207t\ENQ\US\243\149\128\230u'P\233j\164\248U1\NAK\182\146\235&\ACK\DC4-l\163,\191n\153\248\r\ESCH\229\134\209eh\163\132\169\247\ETB\234\DC4\176\239\187\208w\US(\220\242\&5DpoD\207\167\r\GS\169\ENQDd\152\ETB\179\226xG\217\ETXm\177\196\182\215H\255\221\v\DLE\179\226\GS\SOH\171\167\174\155XX#q]\164*\DC3m\195\175\227\205 \187\140\213\154\250Ea\253z\STX"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataAAAA (IPv6 0x2606280002200001 0x248189325c81946)},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataRRSIG 1 8 2 86400 1494974036 1493148678 21214 (Name "example.com.") "\DEL\147H\248t\140@\163\130\DC2\DC1\200\217\225\190\140\132\t\197\197C\164y\223\ENQ\228\195\201\153L\SYN$\179\177EE<\ACK`u\188F9\199[\165\171\177w\192\188l\159\229i\169\254\&4Q.\ACK\214\188\196\166\191AV\255\SO\232\&7,\225V5\255\NUL\186V\246\198\159\&4\164p\243\168+?rz\a\234l,B\208\224C\EM\142\221\181qw\154\164/&\144]\a>\188\223\&9\142h-3\STX\170\231\183Kr\164a\205\228"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 86399, rrData = RDataA (IPv4 0x5db8d822)},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataRRSIG 16 8 2 60 1494968390 1493148678 21214 (Name "example.com.") "\149\vd\208\136+H\224\213\r\246\&2\CAN#\251\233q\SYN\157\220j@2/\157\242\215\173y\ETB\154\135\199\209R\253\\1\DC3Sof\139\143\229\251p\139O/\209\199\US\ACKL\138A+\134\a\187\145\222!n[\252\227L,\NULkj_\219K\163x\252_1\175\161\212.V\CAN\193\215\197\218\248\162\178\&1US\144NY\216#c\230\252\247'\135\160\237j\EOTf\152J\b\SOS+\213\242\SUB.}`@\130\133nm\225"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataTXT ["v=spf1 -all"]},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 59, rrData = RDataTXT ["$Id: example.com 4415 2015-08-24 20:12:23Z davids $"]},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495402611 1493547398 31406 (Name "example.com.") "&\236\\[/n#V\ENQ^\212\n\240\156\239\162\DELQ\211\241w\135\&9o\253\132\218\184s\218\210vn\180C\SI\255\SO\141<$\"\214r\141\n\173\223\248CCP'\132d\NUL,\DC1Q\134J\209\239\f\197e8\145->d\150\232=\153\191\&1\198\139\219\NAK\SUB\231\211\149t;\147[G\211C\190E\177,\GS\ETX\SOa\140\193\166\ETX1\248\EM\200#\\\130\231qF\177\230\140\243\164\SOD\162\201\165b~|\am\242\206j\197\STX\239\250\168\251~\USk\SOT\195Tbl3\136o\162\164\172\158!\128e\215y)\184\162zW\199V\246x\160\233\207S*s\ESC\240\203\&6\174|[\GSmz\NUL\249H\RS>\233\132\f[\ENQ\147\148Q\DLE\DC3\142\208c.\147t\133\229\140\rwTG\179\&4\ETB|&\163KP\a\182\178\174:b':\140o\DC2\f\143\167.S\143\FS@g\187?\209\132`Qf\FS\199\196\148\194\tX\233\166"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 48 8 2 3600 1495402611 1493547398 45620 (Name "example.com.") "\ETXNp\\\169\139\179\160\GS\DEL\225\247F\ACK\207\199M\197\218s\CAN\140B\194\199\218\SI*-\194\172\245\195d7\DC3\USa\236Q\225l 2E|\242\n~J\rq\234\175X%+\196y\189\&4\218\143vl\151\152\212e\223\134\135\145\166\226\201\213H\221V\254\216\177\242s\SYN\148?\192[\152\168\240\SI\130|\154\ACK~b\224wl\DC1g\236\b\149z\150a\SYN\\(\207\a\250\&8\154g\ETB\200\US-g`\EOTm\230$Jn\235\152K\222^\STXSf\136\130\CAN\248\170\179Y\243\152\&1y\143\DEL\\*]\r\SYN;\f\DC3\224~\ACK\150\214\130E\158\182\186\v\191j\131=\244\161/[\DC4\234ya\242\248\STXs\220\225K\203nM\v\241\252v\213\221\135\133\153,H8Z\138\DC4A\188\178`\136L\245\208\245\145\210c\t\154\159\244\146\"E\134\162\174\192\250\135\143$\143KT.\249}\SO\212R\215\140\214\153\DLE1r\247B\GS\161"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\179\133\ETX\EM~.KtP\200%f,\202\DLE-@\197K\188\206X\250\228\166\SUB\181\RSp\ENQc+\135_\DC3c2\191\138\SO\152\214\222XM`\142\235\198\242\158\138\233\&6\239_\168\209@-~\219V_\DEL\131&\192\210\253\EOT\132_\157\129y\168Q\244W\238K\f\SUB\NULo\181\246\182\253\143Z\222IW4\186\164N\204\200C\131\196\&1P\163\182\188\165\215\208^\247\243\228\NAK\224\189!8\224\&1\DC4,B\EM\129\223\215\178\&1\137\218\151\231\247mLJ\147\135\234\237\203\132SG[F\155\158\224\DEL\205\234\&3\238qu\142\194#\NUL\145\&2a\130\SUB\160\203\234=\NAK\242)\250\212\DELzb\154\163\222?\194\149W\r\195\223\228\GS|\143\188s\217+\211O\CAN\174\168,\194\&2\219\&1\158)\EM\GS\202!\214> \249\141A\243\&2\f\"\250\196\&3\234Y\SUB\CAN\DELb\231\248G\NUL\129\129\166\STX\139\216i\136\197\149\189.\SYN\a}\217A\CANV\"\150\188ze\169X\248\147W\ESC*\162\DLEB\212'\230\228Q\128\218\162\252\233.L[ob\220\218{\ENQq\200\174\219\248z\190\216\227\156`K\ACK|\\!\DC4vbu\213W7\n|\174\USZK\139F\a\178\206\&5"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 256 3 8 "\ETX\SOH\NUL\SOH\169\210\128a\180\148\180\210W\214,\198\215\161\155\158\247\ETB\140\198l\223\200\157\181\187s\250\228\NAK\205Z\173t\251\ETX\246\234a\254SV\196HDL\SUBK'KH\221|\176\223\178+\219\237\247h\179Y\175\144y\171)\132\203N\221\160\&4\227\190\140\137\f\227\170g\142\161tw\247\ab\230b\169\238\211\218\191\161\145\183\196\134l\FSY\241\150\134\131\SUBc\240\140\DLE\243\172\FS\SO)\144\211\FSH\160\225\224\ETX\217\238\SO\142\233"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataDNSKEY 257 3 8 "\ETX\SOH\NUL\SOH\157\SUB\170\237k'\170+')\235E\243i>f\178%\154\NUL\199\210\FS\219\244e\245T\SYN,\193\242\143\FS^\155uTJ\131T U\196E\ACK\227\208\SIN\130\157\&3\f\207X!\199\n-\ETBz.e\162\f+{P\148\&1U\208\254\133\230\249\DC1\206*\150\161\166\201\DELL\r\166\228\189}\141\188\204,Q\231\ESC`\SUB\188\161w\147O\210\209\152%-\244\165-\253c\162\232\&2\132\v\SUB\ACK\253\181\147\202J\215\200\DC4|zP\254I\ACK8\220\224\NAK\142U\171V[G\198\nx\254\184A\n\244[\153\215\229\186v\143\"\v\182\237\225\&6S\137\178\r\"\211\241\174\NUL\210\176y\184q\184>C\154\245\210\DC1\179\220\180\208\205\166Y\254%\200\247\158\238\248\185}\236\&6u\182\178\GSy\162xg\SUB\NULz\241\239\163F\NUL\NUL^c\DELw\198\&9f\f\215\DC4\144]`\164\213\148\149\174\USY\150\219i\132\&3\ETX\221\230-\218\231\131\227"},MsgRR {rrName = Name "example.com.", rrClass = Class 1, rrTTL = TTL 3599, rrData = RDataRRSIG 6 8 2 3600 1495444812 1493601562 61845 (Name "example.com.") "t\209\CAN\EOT\EOT\GSwz\237\DC3x\151!\151\255\215\145\CAN\189l\233uxt &\218\137\ETB\205DU\RS\166\240\&7x8\246)\176>\138O\187j\215\148\250\142\213h\160tCR\208|zV&\167\243\130Y\233'\NAK\160k\184\209\SYNFZH\224]\138\235\181\253\219<+=\154\143jo2\213d\237\206\207\NULAY\151\130\f\nD;\137\ACK_\141\240vW\148i\196/\v\DC1s\221Sl\241Y7\STXy(Z9\209"}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 32768, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/e9036c06fc30e6d7582fe9e5238cb718.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 52146, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 4, mhNSCount = 0, mhARCount = 1}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 1) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 2306, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 7192, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 891, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")},MsgRR {rrName = Name "e1863.dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 11, rrData = RDataA (IPv4 0x5c7ab450)}], msgNS = [], msgAR = [MsgRR {rrName = Name ".", rrClass = Class 512, rrTTL = TTL 0, rrData = RDataOPT ""}]} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/f07dc1a95f1663525bf32957288adb78.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/f07dc1a95f1663525bf32957288adb78.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/f07dc1a95f1663525bf32957288adb78.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/f07dc1a95f1663525bf32957288adb78.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/f07dc1a95f1663525bf32957288adb78.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/f07dc1a95f1663525bf32957288adb78.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 56182, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 3, mhNSCount = 1, mhARCount = 0}, msgQD = [MsgQuestion (Name "www.microsoft.com.") (Type 15) (Class 1)], msgAN = [MsgRR {rrName = Name "www.microsoft.com.", rrClass = Class 1, rrTTL = TTL 3342, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.", rrClass = Class 1, rrTTL = TTL 20129, rrData = RDataCNAME (Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.")},MsgRR {rrName = Name "www.microsoft.com-c-2.edgekey.net.globalredir.akadns.net.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataCNAME (Name "e1863.dspb.akamaiedge.net.")}], msgNS = [MsgRR {rrName = Name "dspb.akamaiedge.net.", rrClass = Class 1, rrTTL = TTL 823, rrData = RDataSOA (Name "n0dspb.akamaiedge.net.") (Name "hostmaster.akamai.com.") 1494154901 1000 1000 1000 1800}], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/f3110fafd49cc625b0cc29e99d82ec79.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 62613, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "c.f.f.c.7.f.e.0.0.6.b.7.5.a.4.0.4.0.1.0.5.2.8.7.1.0.8.4.1.0.0.2.ip6.arpa.", rrClass = Class 1, rrTTL = TTL 785, rrData = RDataPTR (Name "ghc.haskell.org.")}], msgNS = [], msgAR = []} \ No newline at end of file Binary files /tmp/tmp_2DLHj/0G4V3SRlRT/cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.bin and /tmp/tmp_2DLHj/WlX7cEn6Cj/cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.bin differ diff -Nru cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show --- cabal-install-head-2.5+git20181017.1.a4578fc/src/resolv-0.1.1.2/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show 1970-01-01 00:00:00.000000000 +0000 +++ cabal-install-head-2.5+git20181127.1.4ed0d54/src/resolv-0.1.1.2/testdata/msg/fc9b623aa6ba4673b84145ab0899a3bd.show 2018-10-27 22:43:14.000000000 +0000 @@ -0,0 +1 @@ +Msg {msgHeader = MsgHeader {mhId = 15722, mhFlags = MsgHeaderFlags {mhQR = IsResponse, mhOpcode = 0, mhAA = False, mhTC = False, mhRD = True, mhRA = True, mhZ = False, mhAD = False, mhCD = False, mhRCode = 0}, mhQDCount = 1, mhANCount = 1, mhNSCount = 0, mhARCount = 0}, msgQD = [MsgQuestion (Name "4.4.8.8.in-addr.arpa.") (Type 12) (Class 1)], msgAN = [MsgRR {rrName = Name "4.4.8.8.in-addr.arpa.", rrClass = Class 1, rrTTL = TTL 86285, rrData = RDataPTR (Name "google-public-dns-b.google.com.")}], msgNS = [], msgAR = []} \ No newline at end of file