linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 07/31] Change the ANDROID_WINDOWS_HOST macro into _WIN32
Date: Fri, 22 Apr 2022 10:53:29 -0700	[thread overview]
Message-ID: <YmLrmeSPGPYmXtwi@google.com> (raw)
In-Reply-To: <20220421221836.3935616-8-bvanassche@acm.org>

Fixed a missing resolution from [PATCH 06/31].

In include/f2fs_fs.h,

71 #ifdef ANDROID_WINDOWS_HOST
72 #undef HAVE_LINUX_TYPES_H
73 #endif

On 04/21, Bart Van Assche wrote:
> This makes it easier to build f2fs-tools for Windows.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  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 <time.h>
>  #include <sys/stat.h>
> -#ifndef ANDROID_WINDOWS_HOST
> +#ifndef _WIN32
>  #include <sys/mount.h>
>  #include <sys/ioctl.h>
>  #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 <mntent.h>
>  #endif
>  #include <time.h>
> -#ifndef ANDROID_WINDOWS_HOST
> +#ifndef _WIN32
>  #include <sys/stat.h>
>  #include <sys/mount.h>
>  #include <sys/ioctl.h>
> @@ -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 <linux/limits.h>
>  #endif
> -#ifndef ANDROID_WINDOWS_HOST
> +#ifndef _WIN32
>  #include <sys/ioctl.h>
>  #endif
>  #include <libgen.h>
> 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 <fcntl.h>
>  #include <string.h>
>  #include <unistd.h>
> -#ifndef ANDROID_WINDOWS_HOST
> +#ifndef _WIN32
>  #include <sys/stat.h>
>  #include <sys/mount.h>
>  #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 <stdbool.h>
>  #include <unistd.h>
>  #include <sys/stat.h>
> -#ifndef ANDROID_WINDOWS_HOST
> +#ifndef _WIN32
>  #include <sys/mount.h>
>  #endif
>  #include <time.h>
> 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 <unistd.h>
>  #include <stdlib.h>
>  #include <stdbool.h>
> -#ifndef ANDROID_WINDOWS_HOST
> +#ifndef _WIN32
>  #include <sys/ioctl.h>
>  #endif
>  #include <sys/stat.h>
> @@ -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

  reply	other threads:[~2022-04-22 17:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 22:18 [f2fs-dev] [PATCH 00/31] Make f2fs-tools easier to maintain Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 01/31] configure.ac: Stop using obsolete macros Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 02/31] configure.ac: Remove two prototype tests Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 03/31] configure.ac: Enable the automake -Wall option Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 04/31] configure.ac: Sort header file names alphabetically Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 05/31] configure.ac: Enable cross-compilation Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 06/31] Switch from the u_int to the uint types Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 07/31] Change the ANDROID_WINDOWS_HOST macro into _WIN32 Bart Van Assche
2022-04-22 17:53   ` Jaegeuk Kim [this message]
2022-04-21 22:18 ` [f2fs-dev] [PATCH 08/31] ci: Build f2fstools upon push and pull requests Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 09/31] Change one array member into a flexible array member Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 10/31] Verify structure sizes at compile time Bart Van Assche
2022-06-10  2:05   ` Peter Collingbourne via Linux-f2fs-devel
2022-06-10 17:12     ` Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 11/31] Suppress a compiler warning Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 12/31] f2fs_fs.h: Use standard fixed width integer types Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 13/31] Remove unnecessary __attribute__((packed)) annotations Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 14/31] Move the be32_to_cpu() definition Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 15/31] Include <stddef.h> instead of defining offsetof() Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 16/31] Use %zu to format size_t Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 17/31] Fix the MinGW build Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 18/31] configure.ac: Detect the sparse/sparse.h header Bart Van Assche
2022-04-22 19:01   ` Jaegeuk Kim
2022-04-21 22:18 ` [f2fs-dev] [PATCH 19/31] configure.ac: Detect selinux/android.h Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 20/31] mkfs/f2fs_format.c: Suppress a compiler warning Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 21/31] fsck: Remove a superfluous include directive Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 22/31] tools/f2fscrypt.c: Fix build without uuid/uuid.h header file Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 23/31] fsck/main.c: Suppress a compiler warning Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 24/31] Change #ifdef _WIN32 checks into #ifdef HAVE_.* Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 25/31] fsck/segment.c: Remove dead code Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 26/31] tools/f2fs_io: Fix the type of 'ret' Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 27/31] Annotate switch/case fallthrough Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 28/31] Suppress a compiler warning about integer truncation Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 29/31] Support cross-compiliation for PowerPC Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 30/31] Fix PowerPC format string warnings Bart Van Assche
2022-04-21 22:18 ` [f2fs-dev] [PATCH 31/31] ci: Enable -Wall, -Wextra and -Werror Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YmLrmeSPGPYmXtwi@google.com \
    --to=jaegeuk@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).