From d8ccdad704b1d28b5ef32e1c6548f6d7510c2709 Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Mon, 20 Jul 2009 05:02:28 +0300 Subject: [PATCH] Remove unused header --- gui/binary_location.h | 41 ----------------------------------------- gui/main.cpp | 1 - 2 files changed, 42 deletions(-) delete mode 100644 gui/binary_location.h diff --git a/gui/binary_location.h b/gui/binary_location.h deleted file mode 100644 index 0efdc776..00000000 --- a/gui/binary_location.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Find the location of the program in the filesytem. - * Copyright (C) 2008 Dave Robillard - * - * This 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 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 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 St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef _GNU_SOURCE - #define _GNU_SOURCE -#endif - -#include -#include -#include -#include - -/** Return the absolute path of the binary. - * Returned value must be freed by caller. - */ -static char* -binary_location() -{ - Dl_info dli; - dladdr((void*)&binary_location, &dli); - - char* bin_loc = (char*)calloc(PATH_MAX, sizeof(char)); - realpath(dli.dli_fname, bin_loc); - - return bin_loc; -} - diff --git a/gui/main.cpp b/gui/main.cpp index eb9a4b4f..21a6a15d 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -30,7 +30,6 @@ #include #include #include "config.h" -#include "binary_location.h" #include "Patchage.hpp" #include "globals.hpp"