From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F4182C433FE for ; Thu, 21 Apr 2022 22:19:10 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nhf8o-0001dz-Tz; Thu, 21 Apr 2022 22:19:09 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nhf8n-0001df-5E for linux-f2fs-devel@lists.sourceforge.net; Thu, 21 Apr 2022 22:19:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: 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=5eF/kEPp0NCNZxzoYvUyebXdhdVXQwZo8uakWZydwUk=; b=ToZFuxieqE0+8VU9WutuSF4nWt G+DEklWVCRDZtbTgpYGx/B+uHwqZKFg7Pbxz0fTS8FddWHDKcmJu2WHaaCXZ1D5q7RzgjmHvsVo9m a0a1PdAPTFconv+PkxdJJ/8NfHuE5ElApzV+XngBFC4vC+RepVSwEoyahoDUezp9UnW0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=5eF/kEPp0NCNZxzoYvUyebXdhdVXQwZo8uakWZydwUk=; b=gGdAgO7aLYcgdvb5QHGB/wLRwZ oALwyW7VaWovu12SOP2r+qNGXq6q69kDpj9f2jrsdsK2qb6wSIAjb3PNwAnnVJ/5yAdmnd72os9cD tgznqI7YhMONbaQkWdLgqcWjLHfP9OC45YSpjsoc+grc2CqFgBfC9fpgY7LmxI8BYCK4=; Received: from mail-pl1-f178.google.com ([209.85.214.178]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1nhf8j-0002vF-8E for linux-f2fs-devel@lists.sourceforge.net; Thu, 21 Apr 2022 22:19:06 +0000 Received: by mail-pl1-f178.google.com with SMTP id n8so6793506plh.1 for ; Thu, 21 Apr 2022 15:19:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5eF/kEPp0NCNZxzoYvUyebXdhdVXQwZo8uakWZydwUk=; b=i0x7kyu5cOGYJwVqqdbh/5eIMSdNgDDxJQsaqOT/1/7KezA2j8Yq53HSOSMNtOo8Dx Bb7w3Q4e1LhWDIOKzH9D2F/KV2NjjDYTM+SJMuTA5pqCI6fojUHF5qqryN2NjLUqw6xY YPDJXaGSNGRc1utZewal1TirRXFLnqtw8jmRgDnuCB06zmiMEFeQzv17Va4X2kq+PWzL 2U9MMVK4UFe8AYdfhzJ4MFtRgpQySfta06MiLQj7MQPBgPxgvFIpjBnIv8E+vcJNfVoq dfuYhG6K0KerkP+QoEI76Tdu7dfFyPG30PT/A6Ue9Lk/WU8TZ4vogwjmL+HmYPMTyxPZ hYhg== X-Gm-Message-State: AOAM532QHqHtTyXEhGyAMPGWvFtoc7kkFRtiucVXel1kZX+yMwbqltY4 RXqOHXRQ4sG99vxvklgJwV3WJDmtXF48sg== X-Google-Smtp-Source: ABdhPJxEYRR4hVBxo7/d4Z99Ts5m69kqiq4YpaJOetkc+deEQN+AC7goXqoHfLUWWBc2lvJHz38MqA== X-Received: by 2002:a17:902:b10f:b0:156:612f:318d with SMTP id q15-20020a170902b10f00b00156612f318dmr1518153plr.143.1650579539617; Thu, 21 Apr 2022 15:18:59 -0700 (PDT) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:a034:31d8:ca4e:1f35]) by smtp.gmail.com with ESMTPSA id hi21-20020a17090b30d500b001cd4989ff4csm3794876pjb.19.2022.04.21.15.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 15:18:58 -0700 (PDT) From: Bart Van Assche To: Jaegeuk Kim Date: Thu, 21 Apr 2022 15:18:12 -0700 Message-Id: <20220421221836.3935616-8-bvanassche@acm.org> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog In-Reply-To: <20220421221836.3935616-1-bvanassche@acm.org> References: <20220421221836.3935616-1-bvanassche@acm.org> MIME-Version: 1.0 X-Headers-End: 1nhf8j-0002vF-8E Subject: [f2fs-dev] [PATCH 07/31] Change the ANDROID_WINDOWS_HOST macro into _WIN32 X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bart Van Assche , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net This makes it easier to build f2fs-tools for Windows. Signed-off-by: Bart Van Assche --- lib/libf2fs.c | 10 +++++----- lib/libf2fs_io.c | 6 +++--- lib/libf2fs_zoned.c | 2 +- mkfs/f2fs_format.c | 2 +- mkfs/f2fs_format_main.c | 2 +- mkfs/f2fs_format_utils.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/libf2fs.c b/lib/libf2fs.c index b0a892772de1..c7102528f2f4 100644 --- a/lib/libf2fs.c +++ b/lib/libf2fs.c @@ -22,7 +22,7 @@ #endif #include #include -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 #include #include #endif @@ -49,7 +49,7 @@ #define MODELINQUIRY 0x12,0x00,0x00,0x00,0x4A,0x00 #endif -#ifndef ANDROID_WINDOWS_HOST /* O_BINARY is windows-specific flag */ +#ifndef _WIN32 /* O_BINARY is windows-specific flag */ #define O_BINARY 0 #else /* On Windows, wchar_t is 8 bit sized and it causes compilation errors. */ @@ -606,7 +606,7 @@ int write_inode(struct f2fs_node *inode, u64 blkaddr) */ char *get_rootdev() { -#if defined(ANDROID_WINDOWS_HOST) || defined(WITH_ANDROID) +#if defined(_WIN32) || defined(WITH_ANDROID) return NULL; #else struct stat sb; @@ -740,7 +740,7 @@ static int is_mounted(const char *mpt, const char *device) int f2fs_dev_is_umounted(char *path) { -#ifdef ANDROID_WINDOWS_HOST +#ifdef _WIN32 return 0; #else struct stat *st_buf; @@ -872,7 +872,7 @@ void get_kernel_uname_version(__u8 *version) #define BLKSSZGET DKIOCGETBLOCKCOUNT #endif /* APPLE_DARWIN */ -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 static int open_check_fs(char *path, int flag) { if (c.func != DUMP && (c.func != FSCK || c.fix_on || c.auto_fix)) diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c index b985e6f37a0a..bf6dfe240bb7 100644 --- a/lib/libf2fs_io.c +++ b/lib/libf2fs_io.c @@ -23,7 +23,7 @@ #include #endif #include -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 #include #include #include @@ -634,7 +634,7 @@ int dev_reada_block(__u64 blk_addr) int f2fs_fsync_device(void) { -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 int i; for (i = 0; i < c.ndevs; i++) { @@ -783,7 +783,7 @@ int f2fs_finalize_device(void) * in the block device page cache. */ for (i = 0; i < c.ndevs; i++) { -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 ret = fsync(c.devices[i].fd); if (ret < 0) { MSG(0, "\tError: Could not conduct fsync!!!\n"); diff --git a/lib/libf2fs_zoned.c b/lib/libf2fs_zoned.c index c408a4991fa1..cb954feabe61 100644 --- a/lib/libf2fs_zoned.c +++ b/lib/libf2fs_zoned.c @@ -22,7 +22,7 @@ #ifdef HAVE_LINUX_LIMITS_H #include #endif -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 #include #endif #include diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 8bd33ac003c5..332abf60d0d9 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_format.c @@ -13,7 +13,7 @@ #include #include #include -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 #include #include #endif diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c index d05d4e2cb4e5..ecc942b61d63 100644 --- a/mkfs/f2fs_format_main.c +++ b/mkfs/f2fs_format_main.c @@ -15,7 +15,7 @@ #include #include #include -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 #include #endif #include diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c index e84311ae1287..53101d1bd790 100644 --- a/mkfs/f2fs_format_utils.c +++ b/mkfs/f2fs_format_utils.c @@ -26,7 +26,7 @@ #include #include #include -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 #include #endif #include @@ -48,7 +48,7 @@ static int trim_device(int i) { -#ifndef ANDROID_WINDOWS_HOST +#ifndef _WIN32 unsigned long long range[2]; struct stat *stat_buf; struct device_info *dev = c.devices + i; _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel