X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftstdl.cpp;h=35061423c59b6453f839d93e8287a6d1f1e259c7;hb=586d78659d671683f33ec55f4a7d32b28e345ccd;hp=4f3eb661973558aedd57e93f2342aa966b831c28;hpb=cae80f85741d2564d918a0e3285c62e51491a7fc;p=metaproxy-moved-to-github.git diff --git a/src/tstdl.cpp b/src/tstdl.cpp index 4f3eb66..3506142 100644 --- a/src/tstdl.cpp +++ b/src/tstdl.cpp @@ -1,8 +1,20 @@ -/* $Id: tstdl.cpp,v 1.1 2005-12-10 09:59:10 adam Exp $ - Copyright (c) 2005, Index Data. +/* This file is part of Metaproxy. + Copyright (C) Index Data -%LICENSE% - */ +Metaproxy 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, or (at your option) any later +version. + +Metaproxy 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 St, Fifth Floor, Boston, MA 02110-1301 USA +*/ #include "config.hpp" @@ -25,12 +37,12 @@ int main(int argc, char **argv) void *mod = dlopen(argv[1][0] ? argv[1] : 0, RTLD_NOW|RTLD_LOCAL); if (!mod) { - cerr << "dlopen failed for file " << argv[1] << + cerr << "dlopen failed for file '" << argv[1] << "'\n" << "dlerror=" << dlerror() << endl; exit(1); } void *sym = dlsym(mod, argv[2]); - printf("sym=%p\n", sym); + cout << "sym=" << sym << endl; dlclose(mod); exit(0); #else @@ -42,8 +54,9 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil - * c-file-style: "stroustrup" * End: * vim: shiftwidth=4 tabstop=8 expandtab */ +