find_library('c') return None under Windows

This commit is contained in:
Yann Leboulanger 2009-10-15 19:43:10 +02:00
parent 50aac85e88
commit 384283d2a4
1 changed files with 13 additions and 12 deletions

View File

@ -158,22 +158,23 @@ else:
if dbus_support.supported:
from music_track_listener import MusicTrackListener
import dbus
from ctypes import CDLL
from ctypes.util import find_library
import platform
sysname = platform.system()
libc = CDLL(find_library('c'))
# The constant defined in <linux/prctl.h> which is used to set the name of
# the process.
PR_SET_NAME = 15
if sysname == 'Linux':
libc.prctl(PR_SET_NAME, 'gajim')
elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
libc.setproctitle('gajim')
sysname = platform.system()
if sysname in ('Linux', 'FreeBSD', 'OpenBSD', 'NetBSD'):
libc = CDLL(find_library('c'))
# The constant defined in <linux/prctl.h> which is used to set the name of
# the process.
PR_SET_NAME = 15
if sysname == 'Linux':
libc.prctl(PR_SET_NAME, 'gajim')
elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
libc.setproctitle('gajim')
if gtk.pygtk_version < (2, 12, 0):
pritext = _('Gajim needs PyGTK 2.12 or above')