GSoC/GCI Archive
Google Code-in 2011 Haiku

Implement Missing/Incorrect POSIX Functionality defined in header files A-H

completed by: Mohammed Nafees

mentors: Alexander von Gluck IV, Bruno Albuquerque

http://dev.haiku-os.org/ticket/4947

Haiku is missing quite a bit of POSIX functionality (mandatory and optional), some is not implemented correctly, others are exposed in the wrong header. This task is a follow up to a prevous research task which was to locate the missing parts in headers A throughH, this task is to implement the missing features.

Don't assume the previous task is complete or correct, but use it as a starting point:

http://www.google-melange.com/gci/task/show/google/gci2010/haiku/t129193175099

Here's where you can locate the specification (http://www.opengroup.org/onlinepubs/9699919799/).

Here's the results from the previous task:

arpa/inet.h is fine.

--------------------------------------------

assert.h is fine.

--------------------------------------------

ctype.h

None of the locale functions, ..._l(int, locale_t), are declared.

--------------------------------------------

dirent.h

The dir parameter of the dirfd function shouldn't be const.

--------------------------------------------

dlfcn.h is fine.

--------------------------------------------

errno.h is fine.

--------------------------------------------

fcntl.h

Flags for fcntl() are missing: F_GETOWN and F_SETOWN.

File creation flag for open() is missing: O_TTY_INIT.
File access mode flags for open() are missing: O_EXEC and O_SEARCH.

The following optional functionality is missing:

int posix_fadvise(int, off_t, off_t, int);
int posix_fallocate(int, off_t, off_t);

POSIX_FADV_DONTNEED
POSIX_FADV_NOREUSE
POSIX_FADV_NORMAL
POSIX_FADV_RANDOM
POSIX_FADV_SEQUENTIAL
POSIX_FADV_WILLNEED

--------------------------------------------

fenv.h is fine.

--------------------------------------------

fnmatch.h is fine.

--------------------------------------------

glob.h is fine.

--------------------------------------------

grp.h is fine.

--------------------------------------------

The following headers are missing:

aio.h,
complex.h,
cpio.h,
float.h,
fmtmsg.h,
ftw.h.

 

--------------------------------------

Implementing aio.h is covered on another task. complex.h, cpio.h, float.h, fmtmsg.h and ftw.h can also be skipped for this task.