Differences From Artifact [d03343d8fd]:
- File
src/socket.m
— part of check-in
[b45a563f2b]
at
2020-12-06 17:49:25
on branch trunk
— Use a single global socket base on MorphOS
MorphOS allows sharing a single socket base between tasks, so having a
per-task socket base is unnecessary. (user: js, size: 21070) [annotate] [blame] [check-ins using] [more...]
To Artifact [d886e134b6]:
- File
src/socket.m
— part of check-in
[9cedc18bb3]
at
2020-12-21 21:29:51
on branch trunk
— Don't send messages in destructors
In our tests, we call objc_exit() using atexit(), so the runtime is
already gone by the time any destructors get called. (user: js, size: 21005) [annotate] [blame] [check-ins using] [more...]
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | + + + - - - - + - + + - + + + + + | #endif #include <errno.h> #import "OFArray.h" #import "OFCharacterSet.h" #import "OFLocale.h" #ifdef OF_HAVE_THREADS # import "OFMutex.h" #endif #import "OFString.h" #import "OFException.h" /* For some E* -> WSAE* defines */ #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFLockFailedException.h" #import "OFUnlockFailedException.h" #import "socket.h" #import "socket_helpers.h" #ifdef OF_HAVE_THREADS |
︙ | |||
75 76 77 78 79 80 81 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - + | # endif # endif #endif #if defined(OF_HAVE_THREADS) && defined(OF_AMIGAOS) && !defined(OF_MORPHOS) OF_CONSTRUCTOR() { |
︙ | |||
121 122 123 124 125 126 127 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - - + + - + - + - + | if (socInit(ctx, 0x100000) != 0) return; atexit((void (*)(void))socExit); # endif # if defined(OF_HAVE_THREADS) && (!defined(OF_AMIGAOS) || defined(OF_MORPHOS)) |
︙ | |||
179 180 181 182 183 184 185 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + - + | if ((socketInterface = (struct SocketIFace *) GetInterface(socketBase, "main", 1, NULL)) == NULL) { CloseLibrary(socketBase); return false; } # endif |
︙ | |||
325 326 327 328 329 330 331 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | - - - + - - - + - | int of_getsockname(of_socket_t sock, struct sockaddr *restrict addr, socklen_t *restrict addrLen) { int ret; # if defined(OF_HAVE_THREADS) && (!defined(OF_AMIGAOS) || defined(OF_MORPHOS)) |
︙ |