Thread: error: expected `)' before "_SPOINTERSIZEARG_"

  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
    Ireland
    Posts
    8,446
    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.
    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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    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.

Popular pages Recent additions subscribe to a feed