Skip to content

Commit

Permalink
Merge pull request #288 from Wolf3s/Cleanups
Browse files Browse the repository at this point in the history
Cleanup compat files
  • Loading branch information
sahlberg authored Nov 24, 2023
2 parents e721dbe + 3a62543 commit e8fd667
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/Makefile.PS2_EE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EE_CFLAGS = -DPS2_EE_PLATFORM -DHAVE_CONFIG_H \
EE_CFLAGS = -DPS2_EE_PLATFORM -DHAVE_CONFIG_H -DNEED_BE64TOH -DNEED_POLL -DNEED_WRITEV -DNEED_READV \
-D_U_=/**/ -I../include -I../include/ps2 -I../include/smb2

EE_LIB = libsmb2.a
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.PS2_IOP
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IOP_CFLAGS = -DPS2_IOP_PLATFORM -DHAVE_CONFIG_H
IOP_CFLAGS = -DPS2_IOP_PLATFORM -DHAVE_CONFIG_H -DNEED_BE64TOH -DNEED_STRDUP -DNEED_READV -DNEED_WRITEV -DNEED_POLL
-D_U_=/**/
IOP_CFLAGS += -Wall -Os -I. -I../include -I../include/ps2 -I../include/smb2

Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.PS3_PPU
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ INCLUDE := ../include ../include/ps3 ../include/smb2
DATA := data
LIBS :=

MACHDEP := -DPS3_PPU_PLATFORM -DHAVE_CONFIG_H -D_U_=/**/
MACHDEP := -DPS3_PPU_PLATFORM -DHAVE_CONFIG_H -DNEED_READV -DNEED_WRITEV -D_U_=/**/

CFLAGS += -O2 -Wall -mcpu=cell $(MACHDEP) -fno-strict-aliasing $(INCLUDES)

Expand Down
16 changes: 2 additions & 14 deletions lib/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,18 @@

#ifdef PS2_EE_PLATFORM

#define NEED_READV
#define NEED_WRITEV
#define NEED_POLL
#define NEED_BE64TOH

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>

#include <sys/time.h>

#endif /* PS2_EE_PLATFORM */

#ifdef PS2_IOP_PLATFORM
#include <sysclib.h>

#define NEED_BE64TOH
#define NEED_STRDUP
#define NEED_READV
#define NEED_WRITEV
#define NEED_POLL

static unsigned long int next = 1;

int random(void)
Expand Down Expand Up @@ -128,9 +119,6 @@ int iop_connect(int sockfd, struct sockaddr *addr, socklen_t addrlen)

#ifdef PS3_PPU_PLATFORM

#define NEED_READV
#define NEED_WRITEV

#include <stdlib.h>

int smb2_getaddrinfo(const char *node, const char*service,
Expand Down
4 changes: 1 addition & 3 deletions lib/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ long long int be64toh(long long int x);

#ifdef PS2_EE_PLATFORM

#include <errno.h>
#include <sys/time.h>

#include <errno.h>
#include <ps2ip.h>
#include <fcntl.h>
#include <unistd.h>

#define getlogin_r(a,b) ENXIO
Expand Down
2 changes: 1 addition & 1 deletion lib/aes128ccm-test.c → tests/aes128ccm-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string.h>
#include <stdlib.h>

#include "aes128ccm.h"
#include "lib/aes128ccm.h"

void test_1(void)
{
Expand Down

0 comments on commit e8fd667

Please sign in to comment.