Bug 120793

Summary: [GTK] GlibUtilities: getCurrentExecutablePath() does not compile on GNU/Hurd
Product: WebKit Reporter: Alberto Garcia <berto>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: benjamin, cmarcelo, commit-queue, gustavo, pochu27
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch gustavo: review+

Description Alberto Garcia 2013-09-05 13:57:43 PDT
That's because PATH_MAX is not defined there.

Reported in Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669059
Comment 1 Alberto Garcia 2013-09-05 13:59:49 PDT
Created attachment 210658 [details]
Comment 2 WebKit Commit Bot 2013-09-05 14:00:52 PDT
Attachment 210658 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/gobject/GlibUtilities.cpp']" exit_code: 1
Source/WTF/wtf/gobject/GlibUtilities.cpp:43:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alberto Garcia 2013-09-05 14:01:25 PDT
Created attachment 210660 [details]

The previous patch needed style fixes, here's the updated one.
Comment 4 Sergio Villar Senin 2013-09-06 01:15:08 PDT
Comment on attachment 210660 [details]

I see how this could help with the build, but IMO the patch should actually fix the underlying issue. I believe there should be a way in GNU/Hurd to retrieve the current executable path even if PATH_MAX is not defined.
Comment 5 Emilio Pozuelo Monfort 2013-09-06 03:41:53 PDT
There's currently no way to get the executable path on GNU/Hurd (there is /proc/self but there's no /proc/self/exe), but the catch-all case in findWebKitProcess() which just uses LIBEXECDIR should work fine there.

If you want we can keep a downstream patch with a dummy getCurrentExecutablePath() until there's a way to get the executable path on the Hurd.
Comment 6 Gustavo Noronha (kov) 2013-09-06 09:38:47 PDT
Comment on attachment 210660 [details]

No point in waiting, I think, let's just do it and we can revisit if it is made possible in the future.
Comment 7 Alberto Garcia 2013-09-06 09:47:49 PDT
Committed r155193: <http://trac.webkit.org/changeset/155193>