public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks
@ 2012-05-22 20:32 rbmj at verizon dot net
  2012-05-22 20:46 ` [Bug libstdc++/53457] " paolo.carlini at oracle dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-05-22 20:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

             Bug #: 53457
           Summary: Accommodate non-compliant ioctl() on VxWorks
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rbmj@verizon.net
                CC: rbmj@verizon.net
              Host: x86_64-linux-gnu
            Target: powerpc-wrs-vxworks
             Build: x86_64-linux-gnu


Created attachment 27480
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27480
Patch

On VxWorks, ioctl()'s third argument is of type int, so this added
macro wraps over ioctl to cast the third argument to an integer.
This *cannot* be in config/os/vxworks/os_defines.h as otherwise
the function prototype will trigger the macro and it will be ugly.

Alternate solution is to #ifdef at the call site.

Attached patch is against trunk.  Without it the compile fails because VxWorks
ioctl() requires third argument to be of type int, and C++ doesn't allow
implicit conversion from pointer to integer.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
@ 2012-05-22 20:46 ` paolo.carlini at oracle dot com
  2012-05-22 21:57 ` rbmj at verizon dot net
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-22 20:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|rbmj at verizon dot net     |

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-22 20:31:22 UTC ---
I'm not an expert in this area, but isn't this something fixincludes could
handle?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
  2012-05-22 20:46 ` [Bug libstdc++/53457] " paolo.carlini at oracle dot com
@ 2012-05-22 21:57 ` rbmj at verizon dot net
  2012-05-23 13:48 ` rbmj at verizon dot net
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-05-22 21:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

rbmj at verizon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rbmj at verizon dot net

--- Comment #2 from rbmj at verizon dot net 2012-05-22 20:45:59 UTC ---
I'm not a fi


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
  2012-05-22 20:46 ` [Bug libstdc++/53457] " paolo.carlini at oracle dot com
  2012-05-22 21:57 ` rbmj at verizon dot net
@ 2012-05-23 13:48 ` rbmj at verizon dot net
  2012-05-23 14:19 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-05-23 13:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #3 from rbmj at verizon dot net 2012-05-23 13:13:16 UTC ---
I don't know much about fixincludes, but it *seems* to me like it could be done
with fixincludes.  I don't know how to get fixincludes to do that, though.

Also, sorry for the cut-off comment earlier.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (2 preceding siblings ...)
  2012-05-23 13:48 ` rbmj at verizon dot net
@ 2012-05-23 14:19 ` paolo.carlini at oracle dot com
  2012-05-24 21:06 ` rbmj at verizon dot net
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-23 14:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-23 13:47:49 UTC ---
Then, please investigate that possibility, maybe ask for help on the mailing
list too, in principle I consider it a better solution.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (3 preceding siblings ...)
  2012-05-23 14:19 ` paolo.carlini at oracle dot com
@ 2012-05-24 21:06 ` rbmj at verizon dot net
  2012-05-24 22:19 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-05-24 21:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #5 from rbmj at verizon dot net 2012-05-24 20:39:20 UTC ---
Would something like the following fixincludes hacks work?

/*
 *  Wrap VxWorks ioctl to keep everything pretty
 */
fix = {
    hackname    = vxworks_ioctl_macro;
    files       = ioLib.h;
    test        = " -r vxWorks.h ";

    c_fix       = format;
    c_fix_arg   = "%0\n"
        "#define ioctl(fd, func, arg) ((ioctl)((fd), (func), ((int)(arg))))\n";
    c_fix_arg   = "extern[\t ]+int[\t ]+ioctl[\t ]*\([\t ,[:alnum:]]\);";

    test_text   = "`touch vxWorks.h`"
        "extern int ioctl ( int asdf1234, int jkl, int qwerty ) ;";
};


/*
 *  This hack makes makes unistd.h more POSIX-compliant on VxWorks
 */
fix = {
    hackname    = vxworks_unistd;
    files       = unistd.h;
    test        = " -r vxWorks.h ";

    select      = "#[\t ]*include[\t ]+<vxWorks.h>";
    c_fix       = format;
    c_fix_arg   = "%0\n#include <ioLib.h>\n"
        "#ifndef STDIN_FILENO\n"
        "#define STDIN_FILENO 0\n"
        "#endif\n"
        "#ifndef STDOUT_FILENO\n"
        "#define STDOUT_FILENO 1\n"
        "#endif\n"
        "#ifndef STDERR_FILENO\n"
        "#define STDERR_FILENO 2\n"
        "#endif\n";

    test_text   = "`touch vxWorks.h`"
        "#include <vxWorks.h>\n";
}; 

For some reason fixincludes doesn't seem to be doing *anything* when I build
though - I'm confused as to how I run it.  Though looking at fixincludes/README
and the make check tests, everything *looks* correct.

I'm not sure why fixincludes doesn't appear to be applying any fixes.  I can't
find any headers in GCC's build tree that it's applying to, and it's not
applying them to the system headers either.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (4 preceding siblings ...)
  2012-05-24 21:06 ` rbmj at verizon dot net
@ 2012-05-24 22:19 ` paolo.carlini at oracle dot com
  2012-06-25 18:23 ` rbmj at verizon dot net
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-24 22:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-24 22:17:15 UTC ---
I think you should post your ongoing work on the mailing lists (gcc-patches and
CC libstdc++)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (5 preceding siblings ...)
  2012-05-24 22:19 ` paolo.carlini at oracle dot com
@ 2012-06-25 18:23 ` rbmj at verizon dot net
  2012-10-01 23:43 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-06-25 18:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #7 from rbmj at verizon dot net 2012-06-25 18:23:02 UTC ---
Fixed with this (approved, but not committed) patch series:
http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00382.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (6 preceding siblings ...)
  2012-06-25 18:23 ` rbmj at verizon dot net
@ 2012-10-01 23:43 ` paolo.carlini at oracle dot com
  2012-10-02  1:08 ` rbmj at verizon dot net
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-01 23:43 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-01 23:43:25 UTC ---
Can we close this now? I think we figured out that wasn't a C++ library-proper
issue, instead a fixincludes issue, but I don't understand whether the patches
are actually in and we can close this?!?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (7 preceding siblings ...)
  2012-10-01 23:43 ` paolo.carlini at oracle dot com
@ 2012-10-02  1:08 ` rbmj at verizon dot net
  2012-10-02  9:56 ` [Bug target/53457] " paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-10-02  1:08 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #9 from rbmj at verizon dot net 2012-10-02 01:08:00 UTC ---
Paolo:

This was wrapped up with several other fixincludes patches with regards to
vxWorks, and Bruce Korb has approved the set and has agreed to commit. 
However, he's currently busy and unable to commit until "the end of October".

Ref: http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01619.html

Robert Mason


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (8 preceding siblings ...)
  2012-10-02  1:08 ` rbmj at verizon dot net
@ 2012-10-02  9:56 ` paolo.carlini at oracle dot com
  2012-10-02 18:22 ` rbmj at verizon dot net
  2012-10-30  2:02 ` rbmj at verizon dot net
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-02  9:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-02
          Component|libstdc++                   |target
     Ever Confirmed|0                           |1

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-02 09:56:34 UTC ---
Ah I see. The problem is that he wants to do the work in a special way,
otherwise if we had an unified patch ready to go in as-is I could do the work,
of course. Please let me know if I can help (maybe Bruce Korb can do the
preparatory work even if he cannot commit?!?). Anyway, this is now "target".


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (9 preceding siblings ...)
  2012-10-02  9:56 ` [Bug target/53457] " paolo.carlini at oracle dot com
@ 2012-10-02 18:22 ` rbmj at verizon dot net
  2012-10-30  2:02 ` rbmj at verizon dot net
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-10-02 18:22 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

--- Comment #11 from rbmj at verizon dot net 2012-10-02 18:21:50 UTC ---
I've tried to split it up as I think Bruce wanted; if you check the thread,
those patches should all be ready.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/53457] Accommodate non-compliant ioctl() on VxWorks
  2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
                   ` (10 preceding siblings ...)
  2012-10-02 18:22 ` rbmj at verizon dot net
@ 2012-10-30  2:02 ` rbmj at verizon dot net
  11 siblings, 0 replies; 13+ messages in thread
From: rbmj at verizon dot net @ 2012-10-30  2:02 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457

rbmj at verizon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #12 from rbmj at verizon dot net 2012-10-30 02:01:45 UTC ---
Fixed in 192952!


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-10-30  2:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 20:32 [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks rbmj at verizon dot net
2012-05-22 20:46 ` [Bug libstdc++/53457] " paolo.carlini at oracle dot com
2012-05-22 21:57 ` rbmj at verizon dot net
2012-05-23 13:48 ` rbmj at verizon dot net
2012-05-23 14:19 ` paolo.carlini at oracle dot com
2012-05-24 21:06 ` rbmj at verizon dot net
2012-05-24 22:19 ` paolo.carlini at oracle dot com
2012-06-25 18:23 ` rbmj at verizon dot net
2012-10-01 23:43 ` paolo.carlini at oracle dot com
2012-10-02  1:08 ` rbmj at verizon dot net
2012-10-02  9:56 ` [Bug target/53457] " paolo.carlini at oracle dot com
2012-10-02 18:22 ` rbmj at verizon dot net
2012-10-30  2:02 ` rbmj at verizon dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).