find_library('c') return None under Windows
This commit is contained in:
parent
50aac85e88
commit
384283d2a4
1 changed files with 13 additions and 12 deletions
25
src/gajim.py
25
src/gajim.py
|
@ -158,22 +158,23 @@ else:
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
from music_track_listener import MusicTrackListener
|
from music_track_listener import MusicTrackListener
|
||||||
import dbus
|
import dbus
|
||||||
|
|
||||||
from ctypes import CDLL
|
from ctypes import CDLL
|
||||||
from ctypes.util import find_library
|
from ctypes.util import find_library
|
||||||
import platform
|
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
|
sysname = platform.system()
|
||||||
# the process.
|
if sysname in ('Linux', 'FreeBSD', 'OpenBSD', 'NetBSD'):
|
||||||
PR_SET_NAME = 15
|
libc = CDLL(find_library('c'))
|
||||||
|
|
||||||
if sysname == 'Linux':
|
# The constant defined in <linux/prctl.h> which is used to set the name of
|
||||||
libc.prctl(PR_SET_NAME, 'gajim')
|
# the process.
|
||||||
elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
|
PR_SET_NAME = 15
|
||||||
libc.setproctitle('gajim')
|
|
||||||
|
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):
|
if gtk.pygtk_version < (2, 12, 0):
|
||||||
pritext = _('Gajim needs PyGTK 2.12 or above')
|
pritext = _('Gajim needs PyGTK 2.12 or above')
|
||||||
|
|
Loading…
Add table
Reference in a new issue