On Sat, 21 Nov 2009 16:44:54 +0100 Albin Tonnerre <[email protected]> said:
> On Sun, 05 Jul 2009 12:45 -0300, Gustavo Sverzut Barbieri wrote : > > On Sun, Jul 5, 2009 at 9:22 AM, Albin Tonnerre<[email protected]> > > wrote: > > > Hi there, > > > Here's a bug report that got submitted on the Debian BTS, with a patch > > > allowing embryo to compile on debian/hurd (and more generally on systems > > > were PATH_MAX is udefined). > > > > I could apply this patch, but I fear it's nothing compared to the > > whole EFL where PATH_MAX is heavily used. I guess that a better option > > is to define PATH_MAX = 4096/1024/something-user-specified in > > config.h, which should be included in every source file anyway. With > > that new .m4, we could just copy it to all efl projects and call the > > macro from configure.ac and fix them in the same way. > > Would the following patch do the trick? hmmm... platforms that dont have a PATH_MAX. ewwwww. well it'd need to not just be added, but be used and everything made sure to include config.h if it doesnt explicitly or implicitly yet > --- /dev/null 2009-11-21 13:03:47.817351087 +0100 > +++ m4/efl_path_max.m4 2009-11-21 16:43:28.000000000 +0100 > @@ -0,0 +1,33 @@ > +dnl Check for PATH_MAX in limits.h, and define a default value if not found > +dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd > + > +dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND]) > +dnl > +dnl If PATH_MAX is not defined in <limits.h>, defines it > +dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback > +dnl to using 4096 > + > +AC_DEFUN([EFL_CHECK_PATH_MAX], > +[ > + > +default_max=m4_default([$1], "4096") > +AC_LANG_PUSH([C]) > + > +AC_MSG_CHECKING([for PATH_MAX in limits.h]) > +AC_COMPILE_IFELSE( > + [AC_LANG_PROGRAM([[#include <limits.h>]], > + [[int i = PATH_MAX;]]) > + ], > + AC_MSG_RESULT([yes]), > + [ > + AC_DEFINE_UNQUOTED([PATH_MAX], > + [${default_max}], > + [default value since PATH_MAX is not defined]) > + AC_MSG_RESULT([no: using ${default_max}]) > + ] > +) > + > +AC_LANG_POP([C]) > + > +]) > +dnl end of efl_path_max.m4 > > Regards, > -- > Albin Tonnerre > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
