From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113699 invoked by alias); 24 Feb 2019 16:52:00 -0000 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 Received: (qmail 113500 invoked by uid 89); 24 Feb 2019 16:51:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=UD:tv_usec, distributed X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.62.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 24 Feb 2019 16:51:57 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway20.websitewelcome.com (Postfix) with ESMTP id A4274400CECC7 for ; Sun, 24 Feb 2019 10:51:56 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id xx0OgWKXb4FKpxx0OgojAf; Sun, 24 Feb 2019 10:51:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7ualBqiLWicfvTFOT56AGTQdJwDLp1dOO5z/0S3Is1M=; b=w28MVgGTvsC4cAL9xiZNLVle9V Wkle5NeUF69lKXChaPIjnSRZFtWtkiaQpl8F17UB3Yg4sj0BQsmXEHkvWthC2No8V4KYCw0h59f27 qeQ7NTVgsLuNjcyM8XUNqtRkW; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:44502 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gxx0O-001AKk-Ew; Sun, 24 Feb 2019 10:51:56 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 05/17] Remove gdb_usleep.c Date: Sun, 24 Feb 2019 16:52:00 -0000 Message-Id: <20190224165153.5062-6-tom@tromey.com> In-Reply-To: <20190224165153.5062-1-tom@tromey.com> References: <20190224165153.5062-1-tom@tromey.com> X-SW-Source: 2019-02/txt/msg00407.txt.bz2 I noticed that gdb_usleep is unused, so this patch removes it. gdb/ChangeLog 2019-02-24 Tom Tromey * Makefile.in (COMMON_SFILES): Remove gdb_usleep.c. (HFILES_NO_SRCDIR): Remove gdb_usleep.h. * gdb_usleep.h: Remove. * gdb_usleep.c: Remove. * utils.c: Don't include gdb_usleep.h. --- gdb/ChangeLog | 8 ++++++++ gdb/Makefile.in | 2 -- gdb/gdb_usleep.c | 39 --------------------------------------- gdb/gdb_usleep.h | 30 ------------------------------ gdb/utils.c | 1 - 5 files changed, 8 insertions(+), 72 deletions(-) delete mode 100644 gdb/gdb_usleep.c delete mode 100644 gdb/gdb_usleep.h diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 5614cc3386c..61b0b9d01bd 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1031,7 +1031,6 @@ COMMON_SFILES = \ gdb-dlfcn.c \ gdb_obstack.c \ gdb_regex.c \ - gdb_usleep.c \ gdbarch.c \ gdbarch-selftests.c \ gdbtypes.c \ @@ -1265,7 +1264,6 @@ HFILES_NO_SRCDIR = \ gdb_regex.h \ gdb_select.h \ gdb-stabs.h \ - gdb_usleep.h \ gdb_vfork.h \ gdb_wchar.h \ gdbarch.h \ diff --git a/gdb/gdb_usleep.c b/gdb/gdb_usleep.c deleted file mode 100644 index 0dcba0e6fad..00000000000 --- a/gdb/gdb_usleep.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. - - This file is part of GDB. - - This program 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 3 of the License, or - (at your option) any later version. - - This program 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, see . */ - -#include "defs.h" -#include "gdb_usleep.h" -#include "common/gdb_select.h" -#include "common/gdb_sys_time.h" - -int -gdb_usleep (int usec) -{ - struct timeval delay; - int retval; - - delay.tv_sec = usec / 1000000; - delay.tv_usec = usec % 1000000; - retval = gdb_select (0, 0, 0, 0, &delay); - - if (retval < 0) - retval = -1; - else - retval = 0; - - return retval; -} diff --git a/gdb/gdb_usleep.h b/gdb/gdb_usleep.h deleted file mode 100644 index aadbf0d0ad6..00000000000 --- a/gdb/gdb_usleep.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. - - This file is part of GDB. - - This program 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 3 of the License, or - (at your option) any later version. - - This program 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, see . */ - -#if !defined(GDB_USLEEP_H) -#define GDB_USLEEP_H - -/* Suspend execution for USEC microseconds. - - Limitation: If a signal is raised during the delay, gdb_usleep - might return earlier than requested. - - It returns 0 on success or -1 on error. */ -extern int gdb_usleep (int usect); - -#endif /* !defined(GDB_USLEEP_H) */ - diff --git a/gdb/utils.c b/gdb/utils.c index ec2619642a1..e7fde4942ec 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -62,7 +62,6 @@ #include -#include "gdb_usleep.h" #include "interps.h" #include "gdb_regex.h" #include "common/job-control.h" -- 2.17.2