Changeset 47b571d for storage_xml.c


Ignore:
Timestamp:
2008-06-28T17:35:34Z (16 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
913545e
Parents:
178e2f8
Message:

Avoid g_access on GLib < 2.8.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    r178e2f8 r47b571d  
    3030#include "md5.h"
    3131#include <glib/gstdio.h>
     32
     33#if !GLIB_CHECK_VERSION(2,8,0)
     34/* GLib < 2.8.0 doesn't have g_access, so just use the system access(). */
     35#define g_access access
     36#endif
    3237
    3338typedef enum
     
    246251        if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) )
    247252                log_message( LOGLVL_WARNING, "The configuration directory `%s' does not exist. Configuration won't be saved.", global.conf->configdir );
    248         else if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) || g_access( global.conf->configdir, W_OK ) != 0 )
     253        else if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) ||
     254                         g_access( global.conf->configdir, W_OK ) != 0 )
    249255                log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to `%s'.", global.conf->configdir );
    250256}
Note: See TracChangeset for help on using the changeset viewer.