From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0AE9D246CB for ; Mon, 2 Jul 2018 14:29:44 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7fV7_B9KzKrB for ; Mon, 2 Jul 2018 14:29:43 -0400 (EDT) Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id BAD7B23E28 for ; Mon, 2 Jul 2018 14:29:43 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: drop useless code from os_unix.c References: <443107fc62c650cea3007bf46975e5965518b02a.1530199154.git.kshcherbatov@tarantool.org> <3ccffaa3-22be-3694-1d1d-e11e0b88a108@tarantool.org> From: Vladislav Shpilevoy Message-ID: <1e057fa9-11f5-8679-97c0-aa8f3fe53db7@tarantool.org> Date: Mon, 2 Jul 2018 21:29:36 +0300 MIME-Version: 1.0 In-Reply-To: <3ccffaa3-22be-3694-1d1d-e11e0b88a108@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Kirill Shcherbatov , tarantool-patches@freelists.org On 02/07/2018 17:55, Kirill Shcherbatov wrote: >> Hello. Thanks for the patch! See 2 comments below. > Hi! Thank you for review and fixes. > >> 1. These functions still are visible in grep results. >> 2. And much more functions and constants are either unused, or just >> declared, but has no implementation. Please, complete the patch. I have >> pushed some of removals on the branch as a separate commit. Please, >> squash and finalize. > I've find a few functions to drop. Is it enough? Unfortunately no. I have removed 642 lines in the patch I pushed on the branch. Please, squash and then LGTM. > > diff --git a/src/box/sql/os.c b/src/box/sql/os.c > index bec868b..7c11318 100644 > --- a/src/box/sql/os.c > +++ b/src/box/sql/os.c > @@ -70,11 +70,7 @@ int sqlite3_open_file_count = 0; > * > * sqlite3OsRead() > * sqlite3OsWrite() > - * sqlite3OsShmMap() > * sqlite3OsOpen() > - * sqlite3OsDelete() > - * sqlite3OsAccess() > - * sqlite3OsFullPathname() > * > */ > #if defined(SQLITE_TEST) > diff --git a/src/box/sql/os.h b/src/box/sql/os.h > index aaadd80..9476583 100644 > --- a/src/box/sql/os.h > +++ b/src/box/sql/os.h > @@ -41,13 +41,6 @@ > #ifndef _SQLITE_OS_H_ > #define _SQLITE_OS_H_ > > -/* If the SET_FULLSYNC macro is not defined above, then make it > - * a no-op > - */ > -#ifndef SET_FULLSYNC > -#define SET_FULLSYNC(x,y) > -#endif > - > /* > * The default size of a disk sector > */ > @@ -128,11 +121,7 @@ > * 1GB boundary. > * > */ > -#ifdef SQLITE_OMIT_WSD > -#define PENDING_BYTE (0x40000000) > -#else > #define PENDING_BYTE sqlite3PendingByte > -#endif > #define RESERVED_BYTE (PENDING_BYTE+1) > #define SHARED_FIRST (PENDING_BYTE+2) > #define SHARED_SIZE 510 > @@ -149,12 +138,6 @@ void sqlite3OsClose(sqlite3_file *); > int sqlite3OsRead(sqlite3_file *, void *, int amt, i64 offset); > int sqlite3OsWrite(sqlite3_file *, const void *, int amt, i64 offset); > void sqlite3OsFileControlHint(sqlite3_file *, int, void *); > -#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0 > -int sqlite3OsDeviceCharacteristics(sqlite3_file * id); > -int sqlite3OsShmMap(sqlite3_file *, int, int, int, void volatile **); > -int sqlite3OsShmLock(sqlite3_file * id, int, int, int); > -void sqlite3OsShmBarrier(sqlite3_file * id); > -int sqlite3OsShmUnmap(sqlite3_file * id, int); > int sqlite3OsFetch(sqlite3_file * id, i64, int, void **); > int sqlite3OsUnfetch(sqlite3_file *, i64, void *); > > @@ -162,14 +145,6 @@ int sqlite3OsUnfetch(sqlite3_file *, i64, void *); > * Functions for accessing sqlite3_vfs methods > */ > int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int *); > -int sqlite3OsDelete(sqlite3_vfs *, const char *, int); > -int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut); > -int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *); > -#ifndef SQLITE_OMIT_LOAD_EXTENSION > -void *sqlite3OsDlOpen(sqlite3_vfs *, const char *); > -void sqlite3OsDlError(sqlite3_vfs *, int, char *); > -void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *)) (void); > -#endif /* SQLITE_OMIT_LOAD_EXTENSION */ > int sqlite3OsRandomness(sqlite3_vfs *, int, char *); > int sqlite3OsSleep(sqlite3_vfs *, int); > int sqlite3OsGetLastError(sqlite3_vfs *); > diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c > index 5fb29c7..334a257 100644 > --- a/src/box/sql/pragma.c > +++ b/src/box/sql/pragma.c > @@ -43,14 +43,6 @@ > #include "box/schema.h" > #include "box/session.h" > > -#if !defined(SQLITE_ENABLE_LOCKING_STYLE) > -#if defined(__APPLE__) > -#define SQLITE_ENABLE_LOCKING_STYLE 1 > -#else > -#define SQLITE_ENABLE_LOCKING_STYLE 0 > -#endif > -#endif > - > /* > ************************************************************************ > * pragma.h contains several pragmas, including utf's pragmas. > >