Sat, 23 Nov 2024 20:56:06 -0600
Standardize license headers in Windows files
These were not caught earlier since the script only checks files that are being built.
Testing Done:
Cross-compiled and ran tests in wine.
Reviewed at https://reviews.imfreedom.org/r/3676/
| 3712 | 1 | /* |
|
43086
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5474
diff
changeset
|
4 | * |
|
43086
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
7 | * source distribution. |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5474
diff
changeset
|
8 | * |
|
43086
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify it |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the Free |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
11 | * Software Foundation; either version 2 of the License, or (at your option) |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
12 | * any later version. |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5474
diff
changeset
|
13 | * |
|
43086
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, but WITHOUT |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
17 | * more details. |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5474
diff
changeset
|
18 | * |
|
43086
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License along with |
|
de9a870ce36e
Standardize license headers in Windows files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42410
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
| 3712 | 21 | */ |
|
35892
02bf3200b9cb
cross-win32: make use of WIN32_LEAN_AND_MEAN define
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35855
diff
changeset
|
22 | |
|
42410
563e7a17c220
Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42371
diff
changeset
|
23 | #include <purpleconfig.h> |
|
35892
02bf3200b9cb
cross-win32: make use of WIN32_LEAN_AND_MEAN define
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35855
diff
changeset
|
24 | |
|
39373
47667f5c6696
libpurple: Include 'glib/gi18n-lib.h' instead of 'libintl.h'
Mike Ruprecht <cmaiku@gmail.com>
parents:
39020
diff
changeset
|
25 | #include <glib/gi18n-lib.h> |
|
8244
014ff38feea9
[gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents:
6425
diff
changeset
|
26 | #include <winsock2.h> |
|
014ff38feea9
[gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents:
6425
diff
changeset
|
27 | #include <ws2tcpip.h> |
|
3777
a3f8adc4c3e0
[gaim-migrate @ 3917]
Herman Bloggs <herman@bluedigits.com>
parents:
3712
diff
changeset
|
28 | #include <io.h> |
| 3712 | 29 | #include <stdlib.h> |
|
3777
a3f8adc4c3e0
[gaim-migrate @ 3917]
Herman Bloggs <herman@bluedigits.com>
parents:
3712
diff
changeset
|
30 | #include <stdio.h> |
| 3712 | 31 | #include <errno.h> |
|
3777
a3f8adc4c3e0
[gaim-migrate @ 3917]
Herman Bloggs <herman@bluedigits.com>
parents:
3712
diff
changeset
|
32 | #include <sys/timeb.h> |
|
4905
1464e05926f0
[gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents:
4193
diff
changeset
|
33 | #include <sys/stat.h> |
|
3777
a3f8adc4c3e0
[gaim-migrate @ 3917]
Herman Bloggs <herman@bluedigits.com>
parents:
3712
diff
changeset
|
34 | #include <time.h> |
|
10589
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
9611
diff
changeset
|
35 | #include <glib.h> |
|
6425
3e86c949c98a
[gaim-migrate @ 6933]
Herman Bloggs <herman@bluedigits.com>
parents:
5913
diff
changeset
|
36 | #include "debug.h" |
|
3777
a3f8adc4c3e0
[gaim-migrate @ 3917]
Herman Bloggs <herman@bluedigits.com>
parents:
3712
diff
changeset
|
37 | #include "libc_internal.h" |
|
38688
79304d0f6d43
Fix mingw32 compilation
Daniel Kamil Kozar <dkk089@gmail.com>
parents:
38259
diff
changeset
|
38 | #include "util.h" |
|
25333
182125d7b7fc
Fix from the QuteCom folks to compile with Glib < 2.8.5 with MSVC. Fixes #7761. Also some minor cleanup from me.
Daniel Atallah <datallah@pidgin.im>
parents:
24843
diff
changeset
|
39 | #include <glib/gstdio.h> |
|
38604
9ad76b0d9de7
win32/libc_interface: Add missing util.h include for purple_strequal()
Mike Ruprecht <cmaiku@gmail.com>
parents:
38358
diff
changeset
|
40 | #include "util.h" |
| 3712 | 41 | |
|
25333
182125d7b7fc
Fix from the QuteCom folks to compile with Glib < 2.8.5 with MSVC. Fixes #7761. Also some minor cleanup from me.
Daniel Atallah <datallah@pidgin.im>
parents:
24843
diff
changeset
|
42 | #ifndef S_ISDIR |
|
182125d7b7fc
Fix from the QuteCom folks to compile with Glib < 2.8.5 with MSVC. Fixes #7761. Also some minor cleanup from me.
Daniel Atallah <datallah@pidgin.im>
parents:
24843
diff
changeset
|
43 | # define S_ISDIR(m) (((m)&S_IFDIR)==S_IFDIR) |
|
182125d7b7fc
Fix from the QuteCom folks to compile with Glib < 2.8.5 with MSVC. Fixes #7761. Also some minor cleanup from me.
Daniel Atallah <datallah@pidgin.im>
parents:
24843
diff
changeset
|
44 | #endif |
|
21771
0df7285a6164
Better error messages for common Winsock errors. This was Kevin's wonderful idea.
Daniel Atallah <datallah@pidgin.im>
parents:
21635
diff
changeset
|
45 | |
| 3712 | 46 | /* fcntl.h */ |
| 47 | /* This is not a full implementation of fcntl. Update as needed.. */ | |
|
20239
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
48 | int wpurple_fcntl(int socket, int command, ...) { |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
49 | |
| 3712 | 50 | switch( command ) { |
|
20239
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
51 | case F_GETFL: |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
52 | return 0; |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
53 | |
| 3712 | 54 | case F_SETFL: |
| 55 | { | |
|
20239
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
56 | va_list args; |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
57 | int val; |
| 3712 | 58 | int ret=0; |
| 59 | ||
|
20239
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
60 | va_start(args, command); |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
61 | val = va_arg(args, int); |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
62 | va_end(args); |
|
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
63 | |
| 3712 | 64 | switch( val ) { |
| 65 | case O_NONBLOCK: | |
| 66 | { | |
| 67 | u_long imode=1; | |
| 68 | ret = ioctlsocket(socket, FIONBIO, &imode); | |
| 69 | break; | |
| 70 | } | |
| 71 | case 0: | |
|
20239
ae122f419324
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
72 | { |
| 3712 | 73 | u_long imode=0; |
| 74 | ret = ioctlsocket(socket, FIONBIO, &imode); | |
| 75 | break; | |
| 76 | } | |
| 77 | default: | |
| 78 | errno = EINVAL; | |
| 79 | return -1; | |
| 80 | }/*end switch*/ | |
| 81 | if( ret == SOCKET_ERROR ) { | |
| 82 | errno = WSAGetLastError(); | |
| 83 | return -1; | |
| 84 | } | |
| 85 | return 0; | |
| 86 | } | |
| 87 | default: | |
|
40765
a5381c20e802
Use specific purple_debug_* functions
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40668
diff
changeset
|
88 | purple_debug_warning("wpurple", "wpurple_fcntl: Unsupported command"); |
| 3712 | 89 | return -1; |
| 90 | }/*end switch*/ | |
| 91 | } |