[Pidgin] #4313: libpurple tests are missing definition of G_GNUC_NULL_TERMINATED

Pidgin trac at pidgin.im
Fri Dec 7 18:41:58 EST 2007


#4313: libpurple tests are missing definition of G_GNUC_NULL_TERMINATED
-----------------------+----------------------------------------------------
 Reporter:  QuLogic    |       Type:  patch
   Status:  new        |   Priority:  minor
Component:  libpurple  |    Version:  2.3.1
 Keywords:             |    Pending:  0    
-----------------------+----------------------------------------------------
 All the tests in the `libpurple/tests` directory suffer from the same
 problem as outlined [wiki:CHowTo/BasicPluginHowto#HavingTroubleCompiling
 here]. They either include `glib.h`, or `tests.h` which includes `glib.h`,
 but don't include `purple.h`.

 All that's needed of course is to add the following to `tests.h`:
 {{{
 #ifndef G_GNUC_NULL_TERMINATED
 #  if __GNUC__ >= 4
 #    define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
 #  else
 #    define G_GNUC_NULL_TERMINATED
 #  endif /* __GNUC__ >= 4 */
 #endif /* G_GNUC_NULL_TERMINATED */
 }}}

 Also, in `check_libpurple.c`, `tests.h` is included too late. I've
 attached a patch that corrects the problem.

 On the other hand, the tests could just include `purple.h`, but I assumed
 there was some reason they didn't already.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4313>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list