X-Spam-Check-By: sourceware.org
Message-ID: <46B356D3.538A2E4F@dessent.net>
Date: Fri, 03 Aug 2007 09:24:51 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: is LD_PRELOAD available in cygwin?
References: <46B02E5F.3080408@gmail.com> <46B0A563.B672E63@dessent.net> <20070801183926.GC6530@ednor.casa.cgf.cx> <46B2D572.8080200@gmail.com>
Content-Type: text/plain; charset=iso-8859-1
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l73GP1BI008288

Günther Jedenastik wrote:

> well, preloading a library seems working, but the function decoration
> makes problems, but i'm sure this is my fault
> it would be great if anyone has a simple example for cygwin func decorations

Can't you just show us how you declare your replacement open()?  In your
example it looks like you're using C++ so you need to declare it 'extern
"C"' otherwise it will have C++ decoration/mangling which does not match
the function signature of the standard open() function which is a C
function.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


