Overview
Comment: | Initial PSP port.
Does compile with --disable-threads --disable-shared, but does not link |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d230ac577d54fa5e1d6913b74691699a |
User & Date: | js on 2011-02-09 18:55:29 |
Other Links: | manifest | tags |
Context
2011-02-09
| ||
19:34 | More changes to port ObjFW to PSP. check-in: 33f646ce2d user: js tags: trunk | |
18:55 | Initial PSP port. check-in: d230ac577d user: js tags: trunk | |
18:27 | Add two missing includes. check-in: 90893f3cbe user: js tags: trunk | |
Changes
Modified config.sub from [4960851b86] to [7000ece130].
︙ | |||
730 731 732 733 734 735 736 737 738 739 740 741 742 743 | 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | + + + + | miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; psp) basic_machine=mipsallegrexel-psp os=-elf ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) |
︙ |
Modified configure.ac from [d6ec578bbd] to [ecf4c3dfb1].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + + + + + | AC_INIT(ObjFW, 0.4-dev, js@webkeks.org) AC_CONFIG_SRCDIR(src) AS_IF([test x"$host" = x"psp"], [ LIBS="$LIBS -lc -lpspkernel -lpspuser" LIBS="$LIBS -lpspnet -lpspnet_inet -lpspnet_resolver" ]) AC_CANONICAL_HOST AC_LANG([Objective C]) AC_PROG_OBJC AC_PROG_OBJCPP AC_PROG_LN_S |
︙ | |||
112 113 114 115 116 117 118 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + - + - + - + | AC_MSG_CHECKING(which Objective C runtime we use) case $objc_runtime in ObjFW-RT) AC_DEFINE(OF_OBJFW_RUNTIME, 1, [Whether we use the ObjFW runtime]) AC_SUBST(GNU_RUNTIME, "-fgnu-runtime") OBJCFLAGS="$OBJCFLAGS -fgnu-runtime" |
︙ |
Modified src/OFExceptions.m from [66659ddd45] to [c20d586426].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + | # define GET_AT_ERRNO h_errno # else # define GET_AT_ERRNO errno # endif # define GET_SOCK_ERRNO errno # define ERRFMT "Error string was: %s" # define ERRPARAM strerror(errNo) |
︙ |
Modified src/OFFile.h from [c3892e8bd0] to [ee5f8a5c17].
︙ | |||
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | + + | * Not available on Windows. * * \param src The path to the file of which should be linked as a string * \param dest The path to where the file should be linked as a string */ + (void)linkFileAtPath: (OFString*)src toPath: (OFString*)dest; #endif #if !defined(_WIN32) && !defined(_PSP) /** * Symlinks a file. * * Not available on Windows. * * \param src The path to the file of which should be symlinked as a string * \param dest The path to where the file should be symlinked as a string |
︙ |
Modified src/OFFile.m from [719e5e7862] to [ab8f876cd6].
︙ | |||
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | + + | } if (link([src cString], [dest cString]) != 0) @throw [OFLinkFailedException newWithClass: self sourcePath: src destinationPath: dest]; } #endif #if !defined(_WIN32) && !defined(_PSP) + (void)symlinkFileAtPath: (OFString*)src toPath: (OFString*)dest { if ([self directoryExistsAtPath: dest]) { OFString *filename = [self lastComponentOfPath: src]; dest = [OFString stringWithPath: dest, filename, nil]; } |
︙ |
Modified src/OFTCPSocket.m from [b9305562e5] to [1565c3535f].
︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | + + | break; } freeaddrinfo(res0); #else BOOL connected = NO; struct hostent *he; # ifndef _PSP struct servent *se; # endif struct sockaddr_in addr; uint16_t port; char **ip; # ifdef OF_THREADS OFDataArray *addrlist; addrlist = [[OFDataArray alloc] initWithItemSize: sizeof(char**)]; |
︙ | |||
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | + + | # endif @throw [OFAddressTranslationFailedException newWithClass: isa node: node service: service]; } # ifndef _PSP if ((se = getservbyname([service cString], "tcp")) != NULL) port = se->s_port; else { # endif @try { intmax_t p = [service decimalValue]; if (p < 1 || p > 65535) @throw [OFOutOfRangeException newWithClass: isa]; |
︙ | |||
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | + + | } @catch (id e) { # ifdef OF_THREADS [addrlist release]; [mutex unlock]; # endif @throw e; } # ifndef _PSP } # endif memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = port; if (he->h_addrtype != AF_INET || (sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) { |
︙ | |||
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | + + + + | node: node service: service]; } freeaddrinfo(res); #else struct hostent *he; # ifndef _PSP struct servent *se; # endif struct sockaddr_in addr; uint16_t port; # ifdef OF_THREADS [mutex lock]; # endif if ((he = gethostbyname([node cString])) == NULL) { # ifdef OF_THREADS [mutex unlock]; # endif @throw [OFAddressTranslationFailedException newWithClass: isa node: node service: service]; } # ifndef _PSP if ((se = getservbyname([service cString], "tcp")) != NULL) port = se->s_port; else { # endif @try { intmax_t p = [service decimalValue]; if (p < 1 || p > 65535) @throw [OFOutOfRangeException newWithClass: isa]; |
︙ | |||
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | + + | service: service]; } @catch (id e) { # ifdef OF_THREADS [mutex unlock]; # endif @throw e; } # ifndef _PSP } # endif memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = port; if (he->h_addrtype != AF_INET || he->h_addr_list[0] == NULL) { # ifdef OF_THREADS |
︙ |
Modified src/macros.h from [00f7754073] to [957228cdfe].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + | #endif #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif #include <stddef.h> #include <stdint.h> #ifdef _PSP # define INTMAX_MAX LONG_LONG_MAX #endif #ifdef __GNUC__ # define OF_INLINE inline __attribute__((always_inline)) # define OF_LIKELY(cond) __builtin_expect(!!(cond), 1) # define OF_UNLIKELY(cond) __builtin_expect(!!(cond), 0) # define OF_CONST_FUNC __attribute__((const)) #else |
︙ |