error: expected `)' before "_SPOINTERSIZEARG_"

This is a discussion on error: expected `)' before "_SPOINTERSIZEARG_" within the C++ Programming forums, part of the General Programming Boards category; Hello All, I'm trying to compile CVS version of DSS (Darwin Streaming Server), but keep getting these errors: Code: PlaylistBroadcaster.cpp: ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    19

    error: expected `)' before "_SPOINTERSIZEARG_"

    Hello All,

    I'm trying to compile CVS version of DSS (Darwin Streaming Server), but keep getting these errors:

    Code:
    PlaylistBroadcaster.cpp: In function `void RegisterEventHandlers()':
    PlaylistBroadcaster.cpp:2097: error: expected `)' before "_SPOINTERSIZEARG_"
    PlaylistBroadcaster.cpp:2104: error: expected `)' before "_SPOINTERSIZEARG_"
    PlaylistBroadcaster.cpp:2112: error: expected `)' before "_SPOINTERSIZEARG_"
    PlaylistBroadcaster.cpp:2120: error: expected `)' before "_SPOINTERSIZEARG_"
    This is how PlaylistBroadcaster.cpp looks like at these lines:

    Code:
       2094     if ( ::signal(SIGTERM, SIG_IGN) != SIG_IGN)
       2095     {   // from kill...
       2096         if ( ::sigaction(SIGTERM, &act, NULL) != 0 )
       2097         {   qtss_printf( "- PlaylistBroadcaster: System error (%"_SPOINTERSIZEARG_").\n",         (PointerSizedInt)SIG_ERR );
       2098         }
       2099     }
       2100
       2101     if ( ::signal(SIGINT, SIG_IGN) != SIG_IGN)
       2102     {   // ^C signal
       2103         if ( ::sigaction(SIGINT, &act, NULL)  != 0 )
       2104         {   qtss_printf( "- PlaylistBroadcaster: System error (%"_SPOINTERSIZEARG_").\n",         (PointerSizedInt)SIG_ERR );
       2105         }
       2106
       2107     }
       2108
       2109     if ( ::signal(SIGPIPE, SIG_IGN) != SIG_IGN)
       2110     {   // broken pipe probably from a failed RTSP session (the server went down?)
       2111         if ( ::sigaction(SIGPIPE, &act, NULL)   != 0 )
       2112         {   qtss_printf( "- PlaylistBroadcaster: System error (%"_SPOINTERSIZEARG_").\n",         (PointerSizedInt)SIG_ERR );
       2113         }
       2114
       2115     }
       2116
       2117     if ( ::signal(SIGHUP, SIG_IGN) != SIG_IGN)
       2118     {   // broken pipe probably from a failed RTSP session (the server went down?)
       2119         if ( ::sigaction(SIGHUP, &act, NULL)  != 0)
       2120         {   qtss_printf( "- PlaylistBroadcaster: System error (%"_SPOINTERSIZEARG_").\n",         (PointerSizedInt)SIG_ERR );
       2121         }
    Could you please tell me what's wrong with the syntax, and how to fix it?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,436
    use \" for those quotes around _SPOINTERSIZEARG_...

    Code:
    qtss_printf( "- PlaylistBroadcaster: System error (%\"_SPOINTERSIZEARG_\").\n",         (PointerSizedInt)SIG_ERR );
    or remove those two quotes altogether?... I'm not familiar with printf(), sorry. But I would guess this last one is the way to go.
    Last edited by Mario F.; 06-03-2006 at 05:53 AM.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    19
    Thank you very much Mario, it helped

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    That makes it compile, but it isn't an answer.

    > qtss_printf( "- PlaylistBroadcaster: System error (%"_SPOINTERSIZEARG_").\n", (PointerSizedInt)SIG_ERR );
    It's probably missing something like
    #define _SPOINTERSIZEARG_ "d"

    Which would cause that printf-like call to become
    qtss_printf( "- PlaylistBroadcaster: System error (%" "d" ").\n", (PointerSizedInt)SIG_ERR );

    Which in turn would be read by the compiler as
    qtss_printf( "- PlaylistBroadcaster: System error (%d).\n", (PointerSizedInt)SIG_ERR );

    Search your header files for any mention of _SPOINTERSIZEARG_, perhaps in some platform-dependent configuration file.
    My guess is, if you're compiling for a new platform, you're missing something.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21