Mon, 04 Nov 2024 23:42:22 -0600
Add a boolean setting for toggling developer mode
This just gives a simple API method for checking the setting.
Testing Done:
Added a temporary `g_warning` to the end of `Pidgin.Application.startup` to verify the setting after modifying the file by hand.
Bugs closed: PIDGIN-17993
Reviewed at https://reviews.imfreedom.org/r/3647/
| 3776 | 1 | /* |
| 15884 | 2 | * purple |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
3 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
4 | * File: libc_interface.h |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
5 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
6 | * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
7 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
11 | * (at your option) any later version. |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
12 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
16 | * GNU General Public License for more details. |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
17 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19387
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5113
diff
changeset
|
21 | * |
| 3776 | 22 | */ |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39383
diff
changeset
|
23 | #ifndef PURPLE_WIN32_LIBC_INTERFACE_H |
|
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39383
diff
changeset
|
24 | #define PURPLE_WIN32_LIBC_INTERFACE_H |
|
35892
02bf3200b9cb
cross-win32: make use of WIN32_LEAN_AND_MEAN define
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35867
diff
changeset
|
25 | |
|
8244
014ff38feea9
[gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents:
7242
diff
changeset
|
26 | #include <winsock2.h> |
|
014ff38feea9
[gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents:
7242
diff
changeset
|
27 | #include <ws2tcpip.h> |
|
4714
08b54a8f301f
[gaim-migrate @ 5025]
Herman Bloggs <herman@bluedigits.com>
parents:
4373
diff
changeset
|
28 | #include <io.h> |
| 3776 | 29 | #include <errno.h> |
| 30 | #include "libc_internal.h" | |
|
10589
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10214
diff
changeset
|
31 | #include <glib.h> |
|
35867
b6f09494adda
cross-win32: hide glib bug of mismatched g_stat and GStatBuf for win32 (not win64)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35863
diff
changeset
|
32 | #include "glibcompat.h" |
| 3776 | 33 | |
|
39383
0f9d49617abc
Use G_BEGIN_DECLS and G_END_DECLS instead of raw extern "C"
Mike Ruprecht <cmaiku@gmail.com>
parents:
35893
diff
changeset
|
34 | G_BEGIN_DECLS |
|
22686
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20294
diff
changeset
|
35 | |
|
18553
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
36 | #ifdef _MSC_VER |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
37 | #define S_IRUSR S_IREAD |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
38 | #define S_IWUSR S_IWRITE |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
39 | #define S_IXUSR S_IEXEC |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
40 | |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
41 | #define S_ISDIR(m) (((m)&S_IFDIR)==S_IFDIR) |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
42 | |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
43 | #define F_OK 0 |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
44 | #endif |
|
a65fadc62b15
Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents:
15936
diff
changeset
|
45 | |
| 3776 | 46 | /* fcntl.h */ |
|
20239
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
47 | #define fcntl( fd, command, ... ) \ |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
48 | wpurple_fcntl( fd, command, ##__VA_ARGS__ ) |
| 3776 | 49 | |
| 50 | /* stdio.h */ | |
|
42405
78c08edcbac7
Fix a Windows-specific preproc condition
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42371
diff
changeset
|
51 | #if (defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 3) || \ |
|
78c08edcbac7
Fix a Windows-specific preproc condition
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42371
diff
changeset
|
52 | (defined(_MSC_VER) && _MSC_VER < 1900) |
|
35863
9def6c9f26a6
cross-win32: don't redefine (v)snprintf on mingw64
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35849
diff
changeset
|
53 | # undef vsnprintf |
|
9def6c9f26a6
cross-win32: don't redefine (v)snprintf on mingw64
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35849
diff
changeset
|
54 | # define vsnprintf _vsnprintf |
|
9def6c9f26a6
cross-win32: don't redefine (v)snprintf on mingw64
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35849
diff
changeset
|
55 | #endif |
| 3776 | 56 | |
|
39383
0f9d49617abc
Use G_BEGIN_DECLS and G_END_DECLS instead of raw extern "C"
Mike Ruprecht <cmaiku@gmail.com>
parents:
35893
diff
changeset
|
57 | G_END_DECLS |
|
22686
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20294
diff
changeset
|
58 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39383
diff
changeset
|
59 | #endif /* PURPLE_WIN32_LIBC_INTERFACE_H */ |