Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <001501c0d3c4$bf0af130$26823bd5@dima> From: "Dmitry Timoshkov" To: Subject: __errno_location() like functionality in Cygwin Date: Thu, 3 May 2001 19:32:25 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-MDRcpt-To: cygwin AT cygwin DOT com X-MDRemoteIP: 213.59.130.38 X-Return-Path: dmitry AT sloboda DOT ru X-MDaemon-Deliver-To: cygwin AT cygwin DOT com Hello. I'm new to this list. I'd like to know, is it possible to define my own __errno() function, which will provide functionality like __errno_location() in linux? This simple program works in linux, but doesn't under Cygwin: static int myerrno = 0; static char buf[256]; int *__errno_location(void) { return &myerrno; } int *__errno(void) { return &myerrno; } int main(void) { int ret; /* provoke an error */ ret = read(-1, buf, 255); printf("ret = %d, myerrno = %d\n", ret, myerrno); return 0; } Any suggestions? Thanks in advance. -- Dmitry. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple