Opened 15 years ago
Closed 14 years ago
#5719 closed enhancement (fixed)
fix a header incompatibility with clang
Reported by: | TechnoMancer | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/alpha1 |
Keywords: | clang ssize_t | Cc: | planche2k@…, mdisreali@… |
Blocked By: | Blocking: | ||
Platform: | All |
Description
This patch fixes an incompatibility with clang it defines ssize_t as in the comment in the file if being compiled with clang.
Attachments (1)
Change History (11)
by , 15 years ago
Attachment: | haiku_clang_patch.diff added |
---|
comment:1 by , 15 years ago
If you see the comment just after the lines you've added, you'll see that we should probably do that regardless of the compiler, and it's gcc's stddef.h which defines ssize_t while it shouldn't.
comment:2 by , 15 years ago
That is indeed true, however this makes clang work now. If someone wishes to fix haiku's gcc to not define ssize_t and then make the definition unconditional that is fine and would be appreciated but I am unfamiliar with gcc and would appreciate it if this patch could be applied in the mean time so that clang will work out of the box on haiku.
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 15 years ago
Cc: | added |
---|
comment:6 by , 15 years ago
According to http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html ssize_t should be defined in <sys/types.h>
comment:7 by , 15 years ago
sys/types.h includes size_t.h to get that def and some others I believe... I think the change should be made there, make the def of ssize_t there unconditional and remove it from gcc's stddef.h
comment:8 by , 14 years ago
Applied a change in hrev37380. I hope it's also valid for clang. Please check.
comment:10 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Closing then. Reopen if needed.
patch for supporting clang