Opened 14 years ago
Closed 10 years ago
#7008 closed bug (fixed)
Implement missing <search.h>, <stdio.h>, <stdlib.h>, <wchar.h> functions and definitions
Reported by: | scottmc | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
These are present in the search.h header, but not yet implemented, so you'll need to implement these:
search.h:
hcreate hdestroy hsearch
The following issues also need to be adressed in <search.h>, <stdio.h>, <stdlib.h> and <wchar.h> This list may or may not be complete and correct, so further research may be required, when in doubt, consult the opengroup spec. http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html http://www.opengroup.org/onlinepubs/9699919799/basedefs/search.h.html http://www.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html
stdio.h
- Cannot find the definition of FILE data type as explained at opengroup.org:
"A structure containing information about a file, defined through typedef."
There's also a few more that are POSIX required but missing in the headers and need to be implemented:
wchar.h
- The tag "tm" is not declared as described at opengroup.org.
stdlib.h
- "<sys/wait.h>" seems not to be included, so
"WNOHANG WUNTRACED WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG" definition is missing, (probably just need to #include <sys/wait.h>)
- Definition/Declaration of "long a64l(const char *);" is missing.
- Definition/Declaration of "int atexit(void (*)(void));" is missing.
- Definition/Declaration of "div_t div(int, int);" is missing.
- Definition/Declaration of "char* l64a(long);" is missing.
This has been posted as a GCI task: http://www.google-melange.com/gci/task/show/google/gci2010/haiku/t129139814475
Attachments (6)
Change History (19)
comment:1 by , 14 years ago
comment:3 by , 13 years ago
Milestone: | R1 → R1/beta1 |
---|
by , 12 years ago
Attachment: | div.c.patch added |
---|
Suggests fixes on implementation of div(), ldiv(), lldiv()
by , 12 years ago
The file I used to test the correctness of the implemented and the fixed functions.
comment:4 by , 12 years ago
Summary of work for Google Code-In task:
The hashtable functions were already implemented. Same goes for atexit(). div() was implemented, but was giving incorrect results, so I made a patch for it. a64l() and l64a() were not implemented, so I am providing both as standalone files. There are also patches for stdlib.h and wchar.h.
comment:5 by , 12 years ago
patch: | 0 → 1 |
---|
comment:6 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:8 by , 11 years ago
Owner: | changed from | to
---|
comment:11 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | reopened → assigned |
and assigning back :)
comment:12 by , 10 years ago
Milestone: | R1/beta1 → Unscheduled |
---|
Move POSIX compatibility related tickets out of R1 milestone (FutureHaiku/Features).
comment:13 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Applied patches with the help of Puck Meerburg in hrev48500.
The part on FILE is wrong. It's defined in stdio_pre.h which is included in stdio.h.
Adding a "struct tm;" covers the wchar.h part indeed.