Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup compat files #288

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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