From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6489 invoked by alias); 31 Jan 2008 21:49:32 -0000 Received: (qmail 6481 invoked by uid 22791); 31 Jan 2008 21:49:31 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Jan 2008 21:49:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4112098217; Thu, 31 Jan 2008 21:49:04 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 21A8998214; Thu, 31 Jan 2008 21:49:04 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JKhHL-0001Ol-4o; Thu, 31 Jan 2008 16:49:03 -0500 Date: Thu, 31 Jan 2008 22:03:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: GDB Patches Subject: Re: [gdbserver] Make mingw32ce gdbserver build again Message-ID: <20080131214903.GA5085@caradoc.them.org> Mail-Followup-To: Pedro Alves , GDB Patches References: <47A138D6.5090108@portugalmail.pt> <20080131145513.GA32620@caradoc.them.org> <47A20C37.9060803@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47A20C37.9060803@codesourcery.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00872.txt.bz2 On Thu, Jan 31, 2008 at 05:58:15PM +0000, Pedro Alves wrote: > gdbserver/ > 2008-01-31 Pedro Alves > > * hostio.c: Don't include errno.h. > (errno_to_fileio_errno): Move to hostio-errno. > * hostio.c: (hostio_error): Remove the error parameter. Defer the > error number outputting to the target->hostio_last_error callback. > (hostio_packet_error): Use FILEIO_EINVAL directly. > (handle_open, handle_pread, hostio_error, handle_unlink): Update > calls to hostio_error. > * hostio-errno.c: New. > * server.h (hostio_last_error_from_errno): Declare. > * target.h (target_ops): Add hostio_last_error member. > * linux-low.c (linux_target_op): Register hostio_last_error_from_errno > as hostio_last_error handler. > * spu-low.c (spu_target_ops): Likewise. > * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error, > wince_hostio_last_error): New functions. > (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error > as hostio_last_error handler. > (win32_target_ops) [!_WIN32_WCE]: Register > hostio_last_error_from_errno as hostio_last_error handler. > * Makefile.in (SFILES): Add hostio.c and hostio-errno.c. > (hostio-errno.o): New rule. > * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs. > * configure.srv (srv_hostio_err_objs): New variable. Default to > hostio-errno.o. > (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "". > * configure: Regenerate. OK. > Index: src/gdb/gdbserver/hostio-errno.c > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ src/gdb/gdbserver/hostio-errno.c 2008-01-31 17:50:02.000000000 +0000 > @@ -0,0 +1,64 @@ > +#include This file needs a copyright notice. > +{ > + int error = errno; > + int fileio_error = errno_to_fileio_error (error); > + sprintf (buf, "F-1,%x", fileio_error); > + errno = error; /* preserve errno */ No need to preserve errno. -- Daniel Jacobowitz CodeSourcery