[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [PATCH] Arts with -fvisibility=hidden
From:       Szombathelyi "György" <gyurco () freemail ! hu>
Date:       2004-11-17 21:32:03
Message-ID: 200411172232.04188.gyurco () freemail ! hu
[Download RAW message or body]

Hi!

The attached patch let arts compile with the hidden visibility option. There's 
one tricky part: the mcopidl compiler extended so the generated c++ classes 
contains the ARTS_EXPORT macro. Maybe there are still missing ARTS_EXPORT 
macros (in artsdsp, I think), but arts & kdelibs now compiles.
Should I (or someone else) commit it?

Bye,
György

____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu

["arts-exports.diff.gz" (application/x-gzip)]
["mcop/arts_export.h.in" (text/x-csrc)]

/* This file is part of the KDE libraries
    Copyright (c) 2002-2003 KDE Team

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library 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
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#ifndef ARTS_EXPORT_H
#define ARTS_EXPORT_H

#include <config.h>
#include <qglobal.h>

/**
 * The ARTS_NO_EXPORT macro marks the symbol of the given variable 
 * to be hidden. A hidden symbol is stripped during the linking step, 
 * so it can't be used from outside the resulting library, which is similar
 * to static. However, static limits the visibility to the current 
 * compilation unit. hidden symbols can still be used in multiple compilation
 * units.
 *
 * \code
 * int ARTS_NO_EXPORT foo;
 * int ARTS_EXPORT bar;
 * \end
 */

#if @HAVE_GCC_VISIBILITY@
/* Visibility is available for GCC newer than 3.4.
 * See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9283 
 */
#define ARTS_NO_EXPORT __attribute__ ((visibility("hidden")))
#define ARTS_EXPORT __attribute__ ((visibility("default")))
#elif defined(Q_WS_WIN)
#define ARTS_NO_EXPORT
#define ARTS_EXPORT __declspec(dllexport)
#else
#define ARTS_NO_EXPORT
#define ARTS_EXPORT
#endif

#endif /* ARTS_EXPORTS */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic