Changeset 187 in Main for trunk/Server
- Timestamp:
- Sep 28, 2024, 9:07:34 AM (7 weeks ago)
- Location:
- trunk/Server
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/Makefile
r183 r187 22 22 mksfoex -d MEMSIZE=1 'Tewi HTTPd' $@ 23 23 24 tewi.self: tewi_strip$(EXEC) 25 sprxlinker tewi_strip$(EXEC) 26 make_self_npdrm tewi_strip$(EXEC) $@ UP0001-TEWI_00-0000000000000000 27 fself tewi_strip$(EXEC) tewi.fake.self 28 29 tewi.pkg: tewi.self 30 mkdir -p pkg/USRDIR 31 cp /usr/local/ps3dev/bin/ICON0.PNG pkg/ICON0.PNG 32 make_self_npdrm tewi.elf pkg/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000 33 sfo.py --title "Tewi HTTPd" --appid "TEWI" -f /usr/local/ps3dev/bin/sfo.xml pkg/PARAM.SFO 34 pkg.py --contentid UP0001-TEWI_00-0000000000000000 pkg/ $@ 35 rm -rf pkg 36 24 37 .c.o: 25 38 $(CC) $(CFLAGS) $(EXTCFLAGS) -c -o $@ $< … … 29 42 30 43 clean: 31 rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp 44 rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg -
trunk/Server/config.c
r182 r187 102 102 config.server_admin = cm_strdup(SERVER_ADMIN); 103 103 config.defined[0] = NULL; 104 #if def _PSP104 #if defined(_PSP) 105 105 strcpy(config.hostname, "psp"); 106 #elif defined(__PPU__) 107 strcpy(config.hostname, "ps3"); 106 108 #else 107 109 gethostname(config.hostname, 1024); -
trunk/Server/http.c
r147 r187 20 20 #else 21 21 #ifdef USE_POLL 22 #ifdef __PPU__ 23 #include <net/poll.h> 24 #else 22 25 #include <poll.h> 26 #endif 23 27 #else 24 28 #include <sys/select.h> -
trunk/Server/main.c
r183 r187 241 241 } 242 242 printf("Connected, My IP is %s\n", info.ip); 243 #elif defined(__PPU__) 244 printf("PS3 Bootstrap, Tewi/%s\n", tw_get_version()); 245 netInitialize(); 243 246 #endif 244 247 int st = startup(argc, argv); -
trunk/Server/module.c
r182 r187 16 16 extern struct tw_config config; 17 17 18 #if def _PSP18 #if defined(_PSP) || defined(__PPU__) 19 19 void* tw_module_load(const char* path) { return NULL; } 20 20 -
trunk/Server/server.c
r183 r187 43 43 #else 44 44 #ifdef USE_POLL 45 #ifdef __PPU__ 46 #include <net/poll.h> 47 #else 45 48 #include <poll.h> 49 #endif 46 50 #else 47 51 #include <sys/select.h> … … 50 54 #include <arpa/inet.h> 51 55 #include <netinet/in.h> 56 #ifndef __PPU__ 52 57 #include <netinet/tcp.h> 58 #endif 53 59 #ifndef NO_GETADDRINFO 54 60 #include <netdb.h> … … 136 142 return 1; 137 143 } 144 #ifndef __PPU__ 138 145 if(setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&yes, sizeof(yes)) < 0) { 139 146 close_socket(sock); … … 141 148 return 1; 142 149 } 150 #endif 143 151 #ifndef NO_IPV6 144 152 int no = 0; … … 431 439 #elif defined(__HAIKU__) 432 440 int32_t tw_server_pass(void* ptr) { 433 #elif defined(_PSP) 441 #elif defined(_PSP) || defined(__PPU__) 434 442 int tw_server_pass(void* ptr) { 435 443 #endif 436 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) 444 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) 437 445 int sock = ((struct pass_entry*)ptr)->sock; 438 446 bool ssl = ((struct pass_entry*)ptr)->ssl; … … 514 522 struct tm tm; 515 523 strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); 516 #if defined(__MINGW32__) || defined(_PSP) 524 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) 517 525 time_t t = 0; 518 526 struct tm* btm = localtime(&t); … … 919 927 int sock = accept(sockets[i], (struct sockaddr*)&claddr, &clen); 920 928 cm_log("Server", "New connection accepted"); 921 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) 929 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) 922 930 struct pass_entry* e = malloc(sizeof(*e)); 923 931 e->sock = sock; … … 945 953 } 946 954 } 947 #elif defined(_PSP) 955 #elif defined(_PSP) || defined(__PPU__) 948 956 tw_server_pass(e); 949 957 #elif defined(__HAIKU__) -
trunk/Server/tw_config.h
r156 r187 19 19 #define NO_IPV6 20 20 #else 21 #ifdef __PPU__ 22 #include <net/net.h> 23 #endif 21 24 #include <netinet/in.h> 22 25 #ifdef __HAIKU__ -
trunk/Server/version.c
r183 r187 22 22 #elif defined(_PSP) 23 23 "PSP" 24 #elif defined(__PPU__) 25 "PS3" 24 26 #else 25 27 "Unix"
Note:
See TracChangeset
for help on using the changeset viewer.