MyGUI fails to build on hurd...

psi29a

06-08-2014 16:15:56

I care only in that I'm the package maintainer for MyGUI on Debian and I would like to see it build there. :)


> /«PKGBUILDDIR»/Common/FileSystemInfo/FileSystemInfo.h:125:13: error: 'PATH_MAX' was not declared in this scope


This seems to be a common enough problems that people either define it themselves or use the solution provided below. Could this be fixed in 3.2.1?

https://www.gnu.org/software/hurd/hurd/ ... lines.html

Every unconditionalized use of PATH_MAX, MAX_PATH or MAXPATHLEN is a POSIX incompatibility. If there is no upper limit on the length of a path (as its the case for GNU), this symbol is not defined in any header file. Instead, you need to either use a different implementation that does not rely on the length of a string or use sysconf() to query the length at runtime. If sysconf() returns -1, you have to use realloc() to allocate the needed memory dynamically. Usually it is thus simpler to just use dynamic allocation. Sometimes the amount is actually known.

Altren

06-08-2014 19:31:20

Fixed in a simple way.

psi29a

06-08-2014 21:09:53

Fixed in a simple way.

With fire? :P

+# ifndef PATH_MAX
+# define PATH_MAX 256
+# endif


Nice, thanks much! :)

It should now build on all supported Debian ports.