From b48ee09c45bbdb9c7c48c38fd5a981da5bb807bd Mon Sep 17 00:00:00 2001
From: Ger van Diepen <diepen@astron.nl>
Date: Tue, 26 Apr 2011 05:50:22 +0000
Subject: [PATCH] bug 1660: Use LOFAR's basename function

---
 LCS/ApplCommon/src/AntField.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/LCS/ApplCommon/src/AntField.cc b/LCS/ApplCommon/src/AntField.cc
index 948baed7979..91286cd5d27 100644
--- a/LCS/ApplCommon/src/AntField.cc
+++ b/LCS/ApplCommon/src/AntField.cc
@@ -30,8 +30,8 @@
 #include <Common/lofar_fstream.h>
 #include <Common/StringUtil.h>
 #include <Common/StreamUtil.h>
+#include <Common/SystemUtil.h>
 #include <ApplCommon/AntField.h>
-#include <libgen.h>
 
 namespace LOFAR {
 
@@ -199,8 +199,9 @@ namespace LOFAR {
 
   void AntField::setZeroes (const string& fileName)
   {
-    // Determine if core, remote, or other.
-    string stype = string(basename(fileName.c_str())).substr(0,2);
+    // Determine statiuon type (core, remote, or other).
+    string bname(basename(fileName));
+    string stype(bname.substr(0,2));
     int nlba = 96;
     int nhba = 96;
     if (stype == "CS"  ||  stype == "RS") {
-- 
GitLab