From 106aea53ba075fae106b5854cc6cf907c4b5bdeb Mon Sep 17 00:00:00 2001
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Date: Tue, 8 Jun 2004 10:43:07 +0000
Subject: [PATCH] From Bertrand: report correctly list of explicitely linked
 shared libraries.

git-svn-id: http://root.cern.ch/svn/root/trunk@9137 27541ba8-7e3a-0410-8455-c3a389f83636
---
 base/src/TSystem.cxx       |  6 +++---
 winnt/src/TWinNTSystem.cxx | 18 ++++++++++++++----
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/base/src/TSystem.cxx b/base/src/TSystem.cxx
index f8dda2cdde9..2d9209483ea 100644
--- a/base/src/TSystem.cxx
+++ b/base/src/TSystem.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TSystem.cxx,v 1.88 2004/06/04 16:47:57 rdm Exp $
+// @(#)root/base:$Name:  $:$Id: TSystem.cxx,v 1.89 2004/06/05 05:22:22 brun Exp $
 // Author: Fons Rademakers   15/09/95
 
 /*************************************************************************
@@ -1334,7 +1334,7 @@ const char *TSystem::GetLibraries(const char *regexp, const char *options,
 
    if ((opt.Length()==0) || (opt.First('S')!=kNPOS)) {
       if (!libs.IsNull()) libs.Append(" ");
-#ifndef WIN32
+//#ifndef WIN32
       const char *linked;
       if ((linked = GetLinkedLibraries())) {
          if (fLinkedLibs != LINKEDLIBS) {
@@ -1351,7 +1351,7 @@ const char *TSystem::GetLibraries(const char *regexp, const char *options,
             libs.Append(linked);
          }
       } else
-#endif
+//#endif
          libs.Append(fLinkedLibs);
    }
 
diff --git a/winnt/src/TWinNTSystem.cxx b/winnt/src/TWinNTSystem.cxx
index f47505c2a23..20b323a94d6 100644
--- a/winnt/src/TWinNTSystem.cxx
+++ b/winnt/src/TWinNTSystem.cxx
@@ -1,4 +1,4 @@
-// @(#)root/winnt:$Name:  $:$Id: TWinNTSystem.cxx,v 1.91 2004/05/28 20:21:38 brun Exp $
+// @(#)root/winnt:$Name:  $:$Id: TWinNTSystem.cxx,v 1.92 2004/06/03 13:29:09 brun Exp $
 // Author: Fons Rademakers   15/09/95
 
 /*************************************************************************
@@ -2806,6 +2806,11 @@ const char *TWinNTSystem::GetLinkedLibraries()
 {
    // Get list of shared libraries loaded at the start of the executable.
    // Returns 0 in case list cannot be obtained or in case of error.
+   char winPath[256];
+   char winDrive[256];
+   char winDir[256];
+   char winName[256];
+   char winExt[256];
 
    if (!gApplication) return 0;
 
@@ -2902,9 +2907,14 @@ const char *TWinNTSystem::GetLinkedLibraries()
                   if (dll.EndsWith(".dll")) {
                      char *dllPath = DynamicPathName(dll, kTRUE);
                      if (dllPath) {
-                        if (!linkedLibs.IsNull())
-                           linkedLibs += " ";
-                        linkedLibs += dllPath;
+                        char *winPath = getenv("windir");
+                        _splitpath(winPath,winDrive,winDir,winName,winExt);
+                        if(!strstr(dllPath, winDir)) {
+                           if (!linkedLibs.IsNull())
+                              linkedLibs += " ";
+                           linkedLibs += dllPath;
+                        }
+                        delete [] winPath;
                      }
                      delete [] dllPath;
                   }
-- 
GitLab