emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android 498f207c86 5/7: Drop unneeded changes to gnulib


From: Po Lu
Subject: feature/android 498f207c86 5/7: Drop unneeded changes to gnulib
Date: Sat, 14 Jan 2023 09:48:54 -0500 (EST)

branch: feature/android
commit 498f207c86437da346c9180de40bd6d336407cc5
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Drop unneeded changes to gnulib
    
    * xcompile/lib/fpending.c (__fpending):
    * xcompile/lib/open.c:
    * xcompile/lib/unistd.c (_GL_UNISTD_INLINE): Remove Android
    patches.
---
 xcompile/lib/fpending.c | 6 ++----
 xcompile/lib/open.c     | 4 ----
 xcompile/lib/unistd.c   | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/xcompile/lib/fpending.c b/xcompile/lib/fpending.c
index 62716b9096..afa840b851 100644
--- a/xcompile/lib/fpending.c
+++ b/xcompile/lib/fpending.c
@@ -33,15 +33,13 @@
 size_t
 __fpending (FILE *fp)
 {
-#if defined __ANDROID__
-  return 0;
   /* Most systems provide FILE as a struct and the necessary bitmask in
      <stdio.h>, because they need it for implementing getc() and putc() as
      fast macros.  */
-#elif defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
   /* GNU libc, BeOS, Haiku, Linux libc5 */
   return fp->_IO_write_ptr - fp->_IO_write_base;
-#elif defined __sferror || defined __DragonFly__
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, 
Android */
   return fp->_p - fp->_bf._base;
 #elif defined __EMX__                /* emx+gcc */
diff --git a/xcompile/lib/open.c b/xcompile/lib/open.c
index 5c95d2b8c3..7ec8fdc35d 100644
--- a/xcompile/lib/open.c
+++ b/xcompile/lib/open.c
@@ -40,11 +40,7 @@ orig_open (const char *filename, int flags, mode_t mode)
 /* Specification.  */
 /* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
    this include because of the preliminary #include <fcntl.h> above.  */
-#ifdef __ANDROID__
-#include <fnctl.h>
-#else
 #include "fcntl.h"
-#endif
 
 #include "cloexec.h"
 
diff --git a/xcompile/lib/unistd.c b/xcompile/lib/unistd.c
index 98bdb4e265..be7a825503 100644
--- a/xcompile/lib/unistd.c
+++ b/xcompile/lib/unistd.c
@@ -18,5 +18,5 @@
 #include <config.h>
 
 #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
-#include <unistd.h>
+#include "unistd.h"
 typedef int dummy;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]