From 2dac20493cf190fb56f04d1fe22f58c30eac1869 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Fri, 6 Jul 2007 19:06:29 +0000 Subject: Fixed NARPLUGIN-106 --- .../cpptasks/compiler/CaptureStreamHandler.java | 4 +++- .../cpptasks/compiler/CommandLineLinker.java | 10 +++++----- src/net/sf/antcontrib/cpptasks/compiler/LinkType.java | 19 ++++++++++--------- 3 files changed, 18 insertions(+), 15 deletions(-) (limited to 'src/net/sf/antcontrib/cpptasks/compiler') diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java b/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java index 1412eee..f58ed8e 100644 --- a/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java +++ b/src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +// BEGINFREEHEP, fully replaced with a runner with threads package net.sf.antcontrib.cpptasks.compiler; import java.io.BufferedReader; @@ -97,7 +98,7 @@ public class CaptureStreamHandler implements ExecuteStreamHandler { /** * Reads concurrently both the process standard output and standard error. * The standard error - if not empty - is copied to the output string array field. Otherwise - * the stanard output is copied to the output field. The output field is set to an empty array + * the standard output is copied to the output field. The output field is set to an empty array * in case of any error. */ public void gatherOutput() { @@ -163,4 +164,5 @@ public class CaptureStreamHandler implements ExecuteStreamHandler { */ public void stop() { } +// ENDFREEHEP } diff --git a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java index 77d8df5..96d85c0 100644 --- a/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java +++ b/src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java @@ -145,10 +145,10 @@ public abstract class CommandLineLinker extends AbstractLinker String[] libnames = null; LibrarySet[] libsets = specificDef.getActiveLibrarySets(defaultProviders,1); - // FREEHEP: check if runtime was added without any present libs - if (linkType.callAddLibrarySets || (libsets.length > 0)) { +// FREEHEP call at all times +// if (libsets.length > 0) { libnames = addLibrarySets(task, libsets, preargs, midargs, endargs); - } +// } StringBuffer buf = new StringBuffer(getIdentifier()); for (int i = 0; i < 3; i++) { @@ -256,7 +256,7 @@ public abstract class CommandLineLinker extends AbstractLinker // // if command length exceeds maximum - // (1024 for Windows) then create a temporary + // then create a temporary // file containing everything but the command name if(commandLength >= this.getMaximumCommandLength()) { try { @@ -336,7 +336,7 @@ public abstract class CommandLineLinker extends AbstractLinker String outputDir, String sourceFile) { String relativePath = CUtil.getRelativePath(outputDir, new File(sourceFile)); - // FREEHEP - take the shortest of the two (Windows file length limitation) +// FREEHEP, return the shortest return quoteFilename(buf, sourceFile.length() > relativePath.length() ? relativePath : sourceFile); } diff --git a/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java b/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java index 2ab5380..2b887ab 100644 --- a/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java +++ b/src/net/sf/antcontrib/cpptasks/compiler/LinkType.java @@ -27,9 +27,10 @@ public class LinkType { private OutputTypeEnum outputType = new OutputTypeEnum(); private boolean staticRuntime = false; private SubsystemEnum subsystem = new SubsystemEnum(); + // FREEHEP private boolean linkCPP = true; - + /** * Constructor * @@ -47,12 +48,11 @@ public class LinkType { String value = outputType.getValue(); return value.equals("executable"); } -// FREEHEP + public boolean isJNIModule() { String value = outputType.getValue(); - return value.equals("jni"); + return value.equals("jni"); } - /** * Gets whether the link should produce a plugin module. * @@ -158,15 +158,16 @@ public class LinkType { public String getSubsystem() { return subsystem.getValue(); } - + +// BEGINFREEHEP public void setLinkCPP(boolean linkCPP) { - this.linkCPP = linkCPP; + this.linkCPP = linkCPP; } public boolean linkCPP() { - return linkCPP; + return linkCPP; } + +// ENDFREEHEP - // FREEHEP: flag - public boolean callAddLibrarySets = false; } -- cgit v1.2.3