View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004737 | Spring engine | public | 2015-04-09 02:11 | 2015-04-09 04:16 | |||||
Reporter | UnitedMarsupials | ||||||||
Assigned To | abma | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 98.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004737: PATH_MAX may be undefined compiling rts/System/Platform/Misc.cpp | ||||||||
Description | Somehow clang++ has no problem, but, when I used g++49, I got the following error: /home/ports/games/spring/work/spring_98.0/rts/System/Platform/Misc.cpp:228:11: error: 'PATH_MAX' was not declared in this scope char buf[PATH_MAX]; ^ /home/ports/games/spring/work/spring_98.0/rts/System/Platform/Misc.cpp:229:21: error: 'buf' was not declared in this scope size_t cb = sizeof(buf); | ||||||||
Steps To Reproduce | Try building on FreeBSD-10.1 with g++49. | ||||||||
Additional Information | The attached patch fixes the problem properly -- it gets rid of the static value completely and uses pathconf() instead. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
abma (administrator) 2015-04-09 04:08 Last edited: 2015-04-09 04:13 |
does climits define PATH_MAX? i.e. #include <climits> ? |
abma (administrator) 2015-04-09 04:15 |
Fix 1af59c6de9c94b185094c4523a2038b2f04d2a8e committed to develop branch: fix 0004737: compile error on FreeBSD, repo: spring changeset id: 4801 |
abma (administrator) 2015-04-09 04:16 |
didn't see that the code is already #if defined(__FreeBSD__): thanks, applied the patch! github pull requests are very welcome, they simplify applying patches & gives you directly the credits :) |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-04-09 02:11 | UnitedMarsupials | New Issue | |
2015-04-09 02:11 | UnitedMarsupials | File Added: patch-rts-System-Platform-Misc | |
2015-04-09 04:08 | abma | Note Added: 0014306 | |
2015-04-09 04:12 | abma | Note Edited: 0014306 | View Revisions |
2015-04-09 04:13 | abma | Note Edited: 0014306 | View Revisions |
2015-04-09 04:15 | abma | Changeset attached | => spring develop 1af59c6d |
2015-04-09 04:15 | abma | Note Added: 0014307 | |
2015-04-09 04:15 | abma | Assigned To | => abma |
2015-04-09 04:15 | abma | Status | new => resolved |
2015-04-09 04:15 | abma | Resolution | open => fixed |
2015-04-09 04:16 | abma | Note Added: 0014308 |