Closed Bug 936297 Opened 11 years ago Closed 11 years ago

expose posix_spawn_file_actions_t via Constants.libc

Categories

(Toolkit Graveyard :: OS.File, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: myk, Assigned: lpy)

Details

(Whiteboard: [mentor=Yoric][lang=c++][good first bug][qa-])

Attachments

(1 file, 3 obsolete files)

Per bug 928168, comment 31, OSFileConstants.cpp should define a constant representing the size of posix_spawn_file_actions_t, so JavaScript code that uses js-ctypes to access libc functions like posix_spawn can declare that type with the appropriate size for the OS.
That's pretty simple to do. If anybody wants to pick this bug, I can mentor it.
Whiteboard: [mentor=Yoric][lang=c++][good first bug]
I am willing to fix it, please assign this bug to me. Thanks.
With pleasure.
Lin, if you need any assistance to get started with this bug, don't hesitate to come and chat with us at irc://irc.mozilla.org/#introduction or equivalently http://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23introduction&nick=PelyongLin
Assignee: nobody → pylaurent1314
Attached patch bug936297.patch (obsolete) — Splinter Review
After the compile error, I add '#include <spawn.h>', but I don't know whether it is necessary or not.
Attachment #831261 - Flags: review?(dteller)
Comment on attachment 831261 [details] [diff] [review]
bug936297.patch

Review of attachment 831261 [details] [diff] [review]:
-----------------------------------------------------------------

r=me if you remove the unnecessary includes.

::: dom/system/OSFileConstants.cpp
@@ +17,5 @@
>  #endif // defined(XP_UNIX)
>  
>  #if defined(XP_LINUX)
>  #include <linux/fadvise.h>
> +#include <spawn.h>

That shouldn't be necessary, XP_LINUX is just a case of XP_UNIX.

@@ +22,5 @@
>  #endif // defined(XP_LINUX)
>  
>  #if defined(XP_MACOSX)
>  #include "copyfile.h"
> +#include <spawn.h>

Likewise for XP_MACOSX.
Attachment #831261 - Flags: review?(dteller) → review+
Attached patch bug936297.patch (obsolete) — Splinter Review
remove unnecessary include
Attachment #831261 - Attachment is obsolete: true
Attachment #831478 - Flags: review+
Keywords: checkin-needed
Attached patch bug936297.patch (obsolete) — Splinter Review
Attachment #831478 - Attachment is obsolete: true
Attachment #831557 - Flags: review+
Keywords: checkin-needed
lpy: when RyanVM said it doesn't build on B2G, I think he meant only that it doesn't build on the *Gonk* builds of B2G, as it should build fine on the *desktop* builds of B2G.

You could check if !defined(MOZ_WIDGET_GONK) to exclude Gonk builds, but that shouldn't be necessary, because ANDROID should be defined for Gonk builds, so building if !defined(ANDROID) should already exclude them.

Thus checking if !defined(ANDROID) should be sufficient to exclude both Fennec builds and Gonk builds of B2G.  Can you update the patch with that change?
Keywords: checkin-needed
From configure.in:

  if test -n "$gonkdir" ; then
  …
      AC_DEFINE(ANDROID)

  - https://github.com/mozilla/mozilla-central/blob/82551c3bfd07193ed63938c31978460ed59287dc/configure.in#L183-L272
Thank you myk, I will update my patch soon.
Attached patch bug936297.patchSplinter Review
Attachment #831557 - Attachment is obsolete: true
Attachment #832053 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/14f9233f4b79
Keywords: checkin-needed
Whiteboard: [mentor=Yoric][lang=c++][good first bug] → [mentor=Yoric][lang=c++][good first bug][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/14f9233f4b79
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [mentor=Yoric][lang=c++][good first bug][fixed-in-fx-team] → [mentor=Yoric][lang=c++][good first bug]
Target Milestone: --- → mozilla28
Whiteboard: [mentor=Yoric][lang=c++][good first bug] → [mentor=Yoric][lang=c++][good first bug][qa-]
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: