[Xapian-tickets] [Xapian] #745: gde_base_type for getdirentries() in OS X is long

Xapian nobody at xapian.org
Thu Dec 15 17:30:10 GMT 2016


#745: gde_base_type for getdirentries() in OS X is long
---------------------------+------------------
        Reporter:  Kronuz  |      Owner:  olly
            Type:  defect  |     Status:  new
        Priority:  normal  |  Milestone:
       Component:  Other   |    Version:
        Severity:  normal  |   Keywords:
      Blocked By:          |   Blocking:
Operating System:  All     |
---------------------------+------------------
 The type of `gde_base_type`, passed to `getdirentries()`, in in OS X (at
 least in macOS and El Capitan) is of type `long`. The man page says: ` int
 getdirentries(int fd, char *buf, int nbytes, long *basep);`

 {{{#!diff
 --- a/xapian-core/common/closefrom.cc
 +++ b/xapian-core/common/closefrom.cc
 @@ -93,7 +93,7 @@ Xapian::Internal::closefrom(int fd)
      typedef off_t gde_base_type;
  #elif defined __APPLE__ // Mac OS X
      const char * path = "/dev/fd";
 -    typedef int gde_base_type;
 +    typedef long gde_base_type;
  #endif
      int dir = open(path, O_RDONLY|O_DIRECTORY);
      if (dir >= 0) {
 }}}

--
Ticket URL: <https://trac.xapian.org/ticket/745>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list