LCOV - code coverage report
Current view: top level - tests/data - shumate-test-resources.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 6 8 75.0 %
Date: 2024-05-11 21:41:31 Functions: 2 3 66.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #include <gio/gio.h>
       2                 :            : 
       3                 :            : #if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
       4                 :            : # define SECTION __attribute__ ((section (".gresource.shumate_tests"), aligned (8)))
       5                 :            : #else
       6                 :            : # define SECTION
       7                 :            : #endif
       8                 :            : 
       9                 :            : static const SECTION union { const guint8 data[2480]; const double alignment; void * const ptr;}  shumate_tests_resource_data = {
      10                 :            :   "\107\126\141\162\151\141\156\164\000\000\000\000\000\000\000\000"
      11                 :            :   "\030\000\000\000\124\001\000\000\000\000\000\050\013\000\000\000"
      12                 :            :   "\000\000\000\000\000\000\000\000\001\000\000\000\003\000\000\000"
      13                 :            :   "\004\000\000\000\005\000\000\000\010\000\000\000\010\000\000\000"
      14                 :            :   "\010\000\000\000\012\000\000\000\012\000\000\000\025\143\003\034"
      15                 :            :   "\005\000\000\000\124\001\000\000\013\000\166\000\140\001\000\000"
      16                 :            :   "\000\002\000\000\260\267\044\060\007\000\000\000\000\002\000\000"
      17                 :            :   "\006\000\114\000\010\002\000\000\014\002\000\000\061\242\163\116"
      18                 :            :   "\005\000\000\000\014\002\000\000\012\000\166\000\030\002\000\000"
      19                 :            :   "\041\005\000\000\324\265\002\000\377\377\377\377\041\005\000\000"
      20                 :            :   "\001\000\114\000\044\005\000\000\050\005\000\000\124\140\007\162"
      21                 :            :   "\005\000\000\000\050\005\000\000\017\000\166\000\070\005\000\000"
      22                 :            :   "\254\005\000\000\130\147\201\147\006\000\000\000\254\005\000\000"
      23                 :            :   "\006\000\114\000\264\005\000\000\314\005\000\000\026\343\213\236"
      24                 :            :   "\001\000\000\000\314\005\000\000\010\000\114\000\324\005\000\000"
      25                 :            :   "\330\005\000\000\113\120\220\013\003\000\000\000\330\005\000\000"
      26                 :            :   "\004\000\114\000\334\005\000\000\340\005\000\000\156\171\077\124"
      27                 :            :   "\005\000\000\000\340\005\000\000\005\000\166\000\350\005\000\000"
      28                 :            :   "\253\007\000\000\377\023\010\121\005\000\000\000\253\007\000\000"
      29                 :            :   "\016\000\166\000\300\007\000\000\103\011\000\000\052\222\154\234"
      30                 :            :   "\005\000\000\000\103\011\000\000\014\000\166\000\120\011\000\000"
      31                 :            :   "\257\011\000\000\163\160\162\151\164\145\163\056\160\156\147\000"
      32                 :            :   "\220\000\000\000\000\000\000\000\211\120\116\107\015\012\032\012"
      33                 :            :   "\000\000\000\015\111\110\104\122\000\000\000\020\000\000\000\020"
      34                 :            :   "\010\006\000\000\000\037\363\377\141\000\000\000\011\160\110\131"
      35                 :            :   "\163\000\000\016\303\000\000\016\303\001\307\157\250\144\000\000"
      36                 :            :   "\000\031\164\105\130\164\123\157\146\164\167\141\162\145\000\167"
      37                 :            :   "\167\167\056\151\156\153\163\143\141\160\145\056\157\162\147\233"
      38                 :            :   "\356\074\032\000\000\000\035\111\104\101\124\070\215\143\374\317"
      39                 :            :   "\300\360\237\201\002\300\104\211\346\121\003\106\015\030\065\140"
      40                 :            :   "\060\031\000\000\130\155\002\036\231\227\335\270\000\000\000\000"
      41                 :            :   "\111\105\116\104\256\102\140\202\000\000\050\165\165\141\171\051"
      42                 :            :   "\147\156\157\155\145\057\000\000\006\000\000\000\163\164\171\154"
      43                 :            :   "\145\056\152\163\157\156\000\000\371\002\000\000\000\000\000\000"
      44                 :            :   "\173\012\040\040\042\163\157\165\162\143\145\163\042\072\040\173"
      45                 :            :   "\012\040\040\040\040\042\055\042\072\040\173\012\040\040\040\040"
      46                 :            :   "\040\040\042\164\171\160\145\042\072\040\042\166\145\143\164\157"
      47                 :            :   "\162\042\054\012\040\040\040\040\040\040\042\164\151\154\145\163"
      48                 :            :   "\042\072\040\133\042\042\135\012\040\040\040\040\175\012\040\040"
      49                 :            :   "\175\054\012\040\040\042\154\141\171\145\162\163\042\072\040\133"
      50                 :            :   "\012\040\040\040\040\173\012\040\040\040\040\040\040\042\151\144"
      51                 :            :   "\042\072\040\042\142\141\143\153\147\162\157\165\156\144\042\054"
      52                 :            :   "\012\040\040\040\040\040\040\042\164\171\160\145\042\072\040\042"
      53                 :            :   "\142\141\143\153\147\162\157\165\156\144\042\054\012\040\040\040"
      54                 :            :   "\040\040\040\042\160\141\151\156\164\042\072\040\173\012\040\040"
      55                 :            :   "\040\040\040\040\040\040\042\142\141\143\153\147\162\157\165\156"
      56                 :            :   "\144\055\143\157\154\157\162\042\072\040\042\147\157\154\144\145"
      57                 :            :   "\156\162\157\144\042\054\012\040\040\040\040\040\040\040\040\042"
      58                 :            :   "\142\141\143\153\147\162\157\165\156\144\055\157\160\141\143\151"
      59                 :            :   "\164\171\042\072\040\060\056\065\012\040\040\040\040\040\040\175"
      60                 :            :   "\012\040\040\040\040\175\054\012\040\040\040\040\173\012\040\040"
      61                 :            :   "\040\040\040\040\042\151\144\042\072\040\042\146\151\154\154\042"
      62                 :            :   "\054\012\040\040\040\040\040\040\042\164\171\160\145\042\072\040"
      63                 :            :   "\042\146\151\154\154\042\054\012\040\040\040\040\040\040\042\163"
      64                 :            :   "\157\165\162\143\145\055\154\141\171\145\162\042\072\040\042\160"
      65                 :            :   "\157\154\171\147\157\156\163\042\054\012\040\040\040\040\040\040"
      66                 :            :   "\042\160\141\151\156\164\042\072\040\173\012\040\040\040\040\040"
      67                 :            :   "\040\040\040\042\146\151\154\154\055\143\157\154\157\162\042\072"
      68                 :            :   "\040\042\142\154\165\145\042\054\012\040\040\040\040\040\040\040"
      69                 :            :   "\040\042\146\151\154\154\055\157\160\141\143\151\164\171\042\072"
      70                 :            :   "\040\060\056\065\012\040\040\040\040\040\040\175\012\040\040\040"
      71                 :            :   "\040\175\054\012\040\040\040\040\173\012\040\040\040\040\040\040"
      72                 :            :   "\042\151\144\042\072\040\042\154\151\156\145\042\054\012\040\040"
      73                 :            :   "\040\040\040\040\042\164\171\160\145\042\072\040\042\154\151\156"
      74                 :            :   "\145\042\054\012\040\040\040\040\040\040\042\163\157\165\162\143"
      75                 :            :   "\145\055\154\141\171\145\162\042\072\040\042\154\151\156\145\163"
      76                 :            :   "\042\054\012\040\040\040\040\040\040\042\160\141\151\156\164\042"
      77                 :            :   "\072\040\173\012\040\040\040\040\040\040\040\040\042\154\151\156"
      78                 :            :   "\145\055\143\157\154\157\162\042\072\040\042\162\145\144\042\054"
      79                 :            :   "\012\040\040\040\040\040\040\040\040\042\154\151\156\145\055\167"
      80                 :            :   "\151\144\164\150\042\072\040\065\012\040\040\040\040\040\040\175"
      81                 :            :   "\012\040\040\040\040\175\054\012\040\040\040\040\173\012\040\040"
      82                 :            :   "\040\040\040\040\042\151\144\042\072\040\042\163\171\155\142\157"
      83                 :            :   "\154\163\042\054\012\040\040\040\040\040\040\042\164\171\160\145"
      84                 :            :   "\042\072\040\042\163\171\155\142\157\154\042\054\012\040\040\040"
      85                 :            :   "\040\040\040\042\163\157\165\162\143\145\055\154\141\171\145\162"
      86                 :            :   "\042\072\040\042\160\157\151\156\164\163\042\054\012\040\040\040"
      87                 :            :   "\040\040\040\042\154\141\171\157\165\164\042\072\040\173\012\040"
      88                 :            :   "\040\040\040\040\040\040\040\042\164\145\170\164\055\146\151\145"
      89                 :            :   "\154\144\042\072\040\042\110\145\154\154\157\054\040\167\157\162"
      90                 :            :   "\154\144\041\042\012\040\040\040\040\040\040\175\012\040\040\040"
      91                 :            :   "\040\175\012\040\040\135\012\175\012\000\000\050\165\165\141\171"
      92                 :            :   "\051\057\000\000\007\000\000\000\163\160\162\151\164\145\163\100"
      93                 :            :   "\062\170\056\152\163\157\156\000\144\000\000\000\000\000\000\000"
      94                 :            :   "\173\012\040\040\042\163\160\162\151\164\145\042\072\040\173\012"
      95                 :            :   "\040\040\040\040\042\170\042\072\040\060\054\012\040\040\040\040"
      96                 :            :   "\042\171\042\072\040\060\054\012\040\040\040\040\042\167\151\144"
      97                 :            :   "\164\150\042\072\040\063\062\054\012\040\040\040\040\042\150\145"
      98                 :            :   "\151\147\150\164\042\072\040\063\062\054\012\040\040\040\040\042"
      99                 :            :   "\160\151\170\145\154\122\141\164\151\157\042\072\040\062\012\040"
     100                 :            :   "\040\175\012\175\000\000\050\165\165\141\171\051\124\145\163\164"
     101                 :            :   "\163\057\000\000\010\000\000\000\012\000\000\000\000\000\000\000"
     102                 :            :   "\004\000\000\000\011\000\000\000\002\000\000\000\163\150\165\155"
     103                 :            :   "\141\164\145\057\005\000\000\000\157\162\147\057\001\000\000\000"
     104                 :            :   "\060\056\160\142\146\000\000\000\263\001\000\000\000\000\000\000"
     105                 :            :   "\032\102\012\012\150\145\154\154\157\167\157\162\154\144\022\030"
     106                 :            :   "\010\321\377\377\377\377\377\377\377\377\001\022\002\000\000\030"
     107                 :            :   "\001\042\005\011\272\035\312\034\032\004\156\141\155\145\042\017"
     108                 :            :   "\012\015\110\145\154\154\157\054\040\167\157\162\154\144\041\050"
     109                 :            :   "\200\040\170\002\032\151\012\005\154\151\156\145\163\022\050\010"
     110                 :            :   "\326\377\377\377\377\377\377\377\377\001\022\002\000\000\030\002"
     111                 :            :   "\042\025\011\360\014\360\016\042\120\222\031\222\030\275\015\367"
     112                 :            :   "\015\227\003\340\011\234\021\022\035\010\325\377\377\377\377\377"
     113                 :            :   "\377\377\377\001\030\002\042\016\011\240\023\226\035\022\234\022"
     114                 :            :   "\245\014\232\013\202\006\032\004\156\141\155\145\042\014\012\012"
     115                 :            :   "\150\145\154\154\157\167\157\162\154\144\050\200\040\170\002\032"
     116                 :            :   "\173\012\006\160\157\151\156\164\163\022\024\010\333\377\377\377"
     117                 :            :   "\377\377\377\377\377\001\030\001\042\005\011\200\040\230\007\022"
     118                 :            :   "\024\010\332\377\377\377\377\377\377\377\377\001\030\001\042\005"
     119                 :            :   "\011\270\054\252\016\022\024\010\331\377\377\377\377\377\377\377"
     120                 :            :   "\377\001\030\001\042\005\011\270\054\314\045\022\024\010\330\377"
     121                 :            :   "\377\377\377\377\377\377\377\001\030\001\042\005\011\326\032\314"
     122                 :            :   "\045\022\024\010\327\377\377\377\377\377\377\377\377\001\030\001"
     123                 :            :   "\042\005\011\310\023\236\030\050\200\040\170\002\032\204\001\012"
     124                 :            :   "\010\160\157\154\171\147\157\156\163\022\043\010\324\377\377\377"
     125                 :            :   "\377\377\377\377\377\001\022\004\000\000\001\001\030\003\042\016"
     126                 :            :   "\011\322\045\274\046\022\204\015\246\013\205\024\026\017\022\062"
     127                 :            :   "\010\323\377\377\377\377\377\377\377\377\001\022\002\001\002\030"
     128                 :            :   "\003\042\037\011\230\043\302\017\062\336\002\201\004\244\002\352"
     129                 :            :   "\006\257\005\274\004\260\006\322\001\257\003\352\005\323\011\351"
     130                 :            :   "\004\017\032\006\156\165\155\142\145\162\032\004\142\157\157\154"
     131                 :            :   "\042\004\040\267\365\001\042\002\070\001\042\002\070\000\050\200"
     132                 :            :   "\040\170\002\000\000\050\165\165\141\171\051\163\160\162\151\164"
     133                 :            :   "\145\163\100\062\170\056\160\156\147\000\000\000\000\000\000\000"
     134                 :            :   "\163\001\000\000\000\000\000\000\211\120\116\107\015\012\032\012"
     135                 :            :   "\000\000\000\015\111\110\104\122\000\000\000\040\000\000\000\040"
     136                 :            :   "\001\003\000\000\000\111\264\350\267\000\000\000\040\143\110\122"
     137                 :            :   "\115\000\000\172\046\000\000\200\204\000\000\372\000\000\000\200"
     138                 :            :   "\350\000\000\165\060\000\000\352\140\000\000\072\230\000\000\027"
     139                 :            :   "\160\234\272\121\074\000\000\000\006\120\114\124\105\377\000\000"
     140                 :            :   "\377\377\377\101\035\064\021\000\000\000\001\142\113\107\104\001"
     141                 :            :   "\377\002\055\336\000\000\000\011\160\110\131\163\000\000\016\303"
     142                 :            :   "\000\000\016\303\001\307\157\250\144\000\000\000\007\164\111\115"
     143                 :            :   "\105\007\347\006\022\001\061\017\345\345\233\072\000\000\000\014"
     144                 :            :   "\111\104\101\124\010\327\143\140\030\334\000\000\000\240\000\001"
     145                 :            :   "\141\045\175\107\000\000\000\045\164\105\130\164\144\141\164\145"
     146                 :            :   "\072\143\162\145\141\164\145\000\062\060\062\063\055\060\066\055"
     147                 :            :   "\061\070\124\060\061\072\064\065\072\060\060\053\060\060\072\060"
     148                 :            :   "\060\327\353\365\356\000\000\000\045\164\105\130\164\144\141\164"
     149                 :            :   "\145\072\155\157\144\151\146\171\000\062\060\062\063\055\060\064"
     150                 :            :   "\055\061\066\124\061\070\072\064\067\072\065\065\053\060\060\072"
     151                 :            :   "\060\060\366\067\247\150\000\000\000\050\164\105\130\164\144\141"
     152                 :            :   "\164\145\072\164\151\155\145\163\164\141\155\160\000\062\060\062"
     153                 :            :   "\063\055\060\066\055\061\070\124\060\061\072\064\071\072\061\065"
     154                 :            :   "\053\060\060\072\060\060\165\015\243\072\000\000\000\031\164\105"
     155                 :            :   "\130\164\123\157\146\164\167\141\162\145\000\167\167\167\056\151"
     156                 :            :   "\156\153\163\143\141\160\145\056\157\162\147\233\356\074\032\000"
     157                 :            :   "\000\000\000\111\105\116\104\256\102\140\202\000\000\050\165\165"
     158                 :            :   "\141\171\051\163\160\162\151\164\145\163\056\152\163\157\156\000"
     159                 :            :   "\117\000\000\000\000\000\000\000\173\012\040\040\042\163\160\162"
     160                 :            :   "\151\164\145\042\072\040\173\012\040\040\040\040\042\170\042\072"
     161                 :            :   "\040\060\054\012\040\040\040\040\042\171\042\072\040\060\054\012"
     162                 :            :   "\040\040\040\040\042\167\151\144\164\150\042\072\040\061\066\054"
     163                 :            :   "\012\040\040\040\040\042\150\145\151\147\150\164\042\072\040\061"
     164                 :            :   "\066\012\040\040\175\012\175\000\000\050\165\165\141\171\051" };
     165                 :            : 
     166                 :            : static GStaticResource static_resource = { shumate_tests_resource_data.data, sizeof (shumate_tests_resource_data.data) - 1 /* nul terminator */, NULL, NULL, NULL };
     167                 :            : 
     168                 :            : G_GNUC_INTERNAL
     169                 :            : GResource *shumate_tests_get_resource (void);
     170                 :          0 : GResource *shumate_tests_get_resource (void)
     171                 :            : {
     172                 :          0 :   return g_static_resource_get_resource (&static_resource);
     173                 :            : }
     174                 :            : /* GLIB - Library of useful routines for C programming
     175                 :            :  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
     176                 :            :  *
     177                 :            :  * SPDX-License-Identifier: LGPL-2.1-or-later
     178                 :            :  *
     179                 :            :  * This library is free software; you can redistribute it and/or
     180                 :            :  * modify it under the terms of the GNU Lesser General Public
     181                 :            :  * License as published by the Free Software Foundation; either
     182                 :            :  * version 2.1 of the License, or (at your option) any later version.
     183                 :            :  *
     184                 :            :  * This library is distributed in the hope that it will be useful,
     185                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     186                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     187                 :            :  * Lesser General Public License for more details.
     188                 :            :  *
     189                 :            :  * You should have received a copy of the GNU Lesser General Public
     190                 :            :  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
     191                 :            :  */
     192                 :            : 
     193                 :            : /*
     194                 :            :  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
     195                 :            :  * file for a list of people on the GLib Team.  See the ChangeLog
     196                 :            :  * files for a list of changes.  These files are distributed with
     197                 :            :  * GLib at ftp://ftp.gtk.org/pub/gtk/.
     198                 :            :  */
     199                 :            : 
     200                 :            : #ifndef __G_CONSTRUCTOR_H__
     201                 :            : #define __G_CONSTRUCTOR_H__
     202                 :            : 
     203                 :            : /*
     204                 :            :   If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
     205                 :            :   destructors, in a usable way, including e.g. on library unload. If not you're on
     206                 :            :   your own.
     207                 :            : 
     208                 :            :   Some compilers need #pragma to handle this, which does not work with macros,
     209                 :            :   so the way you need to use this is (for constructors):
     210                 :            : 
     211                 :            :   #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
     212                 :            :   #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
     213                 :            :   #endif
     214                 :            :   G_DEFINE_CONSTRUCTOR(my_constructor)
     215                 :            :   static void my_constructor(void) {
     216                 :            :    ...
     217                 :            :   }
     218                 :            : 
     219                 :            : */
     220                 :            : 
     221                 :            : #ifndef __GTK_DOC_IGNORE__
     222                 :            : 
     223                 :            : #if  __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
     224                 :            : 
     225                 :            : #define G_HAS_CONSTRUCTORS 1
     226                 :            : 
     227                 :            : #define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
     228                 :            : #define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
     229                 :            : 
     230                 :            : #elif defined (_MSC_VER) && (_MSC_VER >= 1500)
     231                 :            : /* Visual studio 2008 and later has _Pragma */
     232                 :            : 
     233                 :            : /*
     234                 :            :  * Only try to include gslist.h if not already included via glib.h,
     235                 :            :  * so that items using gconstructor.h outside of GLib (such as
     236                 :            :  * GResources) continue to build properly.
     237                 :            :  */
     238                 :            : #ifndef __G_LIB_H__
     239                 :            : #include "gslist.h"
     240                 :            : #endif
     241                 :            : 
     242                 :            : #include <stdlib.h>
     243                 :            : 
     244                 :            : #define G_HAS_CONSTRUCTORS 1
     245                 :            : 
     246                 :            : /* We do some weird things to avoid the constructors being optimized
     247                 :            :  * away on VS2015 if WholeProgramOptimization is enabled. First we
     248                 :            :  * make a reference to the array from the wrapper to make sure its
     249                 :            :  * references. Then we use a pragma to make sure the wrapper function
     250                 :            :  * symbol is always included at the link stage. Also, the symbols
     251                 :            :  * need to be extern (but not dllexport), even though they are not
     252                 :            :  * really used from another object file.
     253                 :            :  */
     254                 :            : 
     255                 :            : /* We need to account for differences between the mangling of symbols
     256                 :            :  * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
     257                 :            :  * with an underscore but symbols on x64/ARM/ARM64 are not.
     258                 :            :  */
     259                 :            : #ifdef _M_IX86
     260                 :            : #define G_MSVC_SYMBOL_PREFIX "_"
     261                 :            : #else
     262                 :            : #define G_MSVC_SYMBOL_PREFIX ""
     263                 :            : #endif
     264                 :            : 
     265                 :            : #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
     266                 :            : #define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
     267                 :            : 
     268                 :            : #define G_MSVC_CTOR(_func,_sym_prefix) \
     269                 :            :   static void _func(void); \
     270                 :            :   extern int (* _array ## _func)(void);              \
     271                 :            :   int _func ## _wrapper(void) { _func(); g_slist_find (NULL,  _array ## _func); return 0; } \
     272                 :            :   __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
     273                 :            :   __pragma(section(".CRT$XCU",read)) \
     274                 :            :   __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;
     275                 :            : 
     276                 :            : #define G_MSVC_DTOR(_func,_sym_prefix) \
     277                 :            :   static void _func(void); \
     278                 :            :   extern int (* _array ## _func)(void);              \
     279                 :            :   int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL,  _array ## _func); return 0; } \
     280                 :            :    __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
     281                 :            :   __pragma(section(".CRT$XCU",read)) \
     282                 :            :   __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;
     283                 :            : 
     284                 :            : #elif defined (_MSC_VER)
     285                 :            : 
     286                 :            : #define G_HAS_CONSTRUCTORS 1
     287                 :            : 
     288                 :            : /* Pre Visual studio 2008 must use #pragma section */
     289                 :            : #define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
     290                 :            : #define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
     291                 :            : 
     292                 :            : #define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
     293                 :            :   section(".CRT$XCU",read)
     294                 :            : #define G_DEFINE_CONSTRUCTOR(_func) \
     295                 :            :   static void _func(void); \
     296                 :            :   static int _func ## _wrapper(void) { _func(); return 0; } \
     297                 :            :   __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;
     298                 :            : 
     299                 :            : #define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
     300                 :            :   section(".CRT$XCU",read)
     301                 :            : #define G_DEFINE_DESTRUCTOR(_func) \
     302                 :            :   static void _func(void); \
     303                 :            :   static int _func ## _constructor(void) { atexit (_func); return 0; } \
     304                 :            :   __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
     305                 :            : 
     306                 :            : #elif defined(__SUNPRO_C)
     307                 :            : 
     308                 :            : /* This is not tested, but i believe it should work, based on:
     309                 :            :  * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
     310                 :            :  */
     311                 :            : 
     312                 :            : #define G_HAS_CONSTRUCTORS 1
     313                 :            : 
     314                 :            : #define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
     315                 :            : #define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
     316                 :            : 
     317                 :            : #define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
     318                 :            :   init(_func)
     319                 :            : #define G_DEFINE_CONSTRUCTOR(_func) \
     320                 :            :   static void _func(void);
     321                 :            : 
     322                 :            : #define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
     323                 :            :   fini(_func)
     324                 :            : #define G_DEFINE_DESTRUCTOR(_func) \
     325                 :            :   static void _func(void);
     326                 :            : 
     327                 :            : #else
     328                 :            : 
     329                 :            : /* constructors not supported for this compiler */
     330                 :            : 
     331                 :            : #endif
     332                 :            : 
     333                 :            : #endif /* __GTK_DOC_IGNORE__ */
     334                 :            : #endif /* __G_CONSTRUCTOR_H__ */
     335                 :            : 
     336                 :            : #ifdef G_HAS_CONSTRUCTORS
     337                 :            : 
     338                 :            : #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
     339                 :            : #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(shumate_testsresource_constructor)
     340                 :            : #endif
     341                 :            : G_DEFINE_CONSTRUCTOR(shumate_testsresource_constructor)
     342                 :            : #ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
     343                 :            : #pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(shumate_testsresource_destructor)
     344                 :            : #endif
     345                 :            : G_DEFINE_DESTRUCTOR(shumate_testsresource_destructor)
     346                 :            : 
     347                 :            : #else
     348                 :            : #warning "Constructor not supported on this compiler, linking in resources will not work"
     349                 :            : #endif
     350                 :            : 
     351                 :         44 : static void shumate_testsresource_constructor (void)
     352                 :            : {
     353                 :         44 :   g_static_resource_init (&static_resource);
     354                 :         44 : }
     355                 :            : 
     356                 :         44 : static void shumate_testsresource_destructor (void)
     357                 :            : {
     358                 :         44 :   g_static_resource_fini (&static_resource);
     359                 :         44 : }

Generated by: LCOV version 1.14