Skip to content

Merge files, replace typedefs w/ stddef.h, etc.#1

Open
johnbaumann wants to merge 1 commit into
masterfrom
house-keeping
Open

Merge files, replace typedefs w/ stddef.h, etc.#1
johnbaumann wants to merge 1 commit into
masterfrom
house-keeping

Conversation

@johnbaumann
Copy link
Copy Markdown
Owner

No description provided.

Comment thread include/errno.h
@@ -1,59 +0,0 @@
/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to keep this file but with just a #include <sys/errno.h>

Comment thread include/fcntl.h
@@ -1,25 +0,0 @@
/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to keep this file but with just a #include <sys/fcntl.h>

Comment thread include/file.h
@@ -1,33 +0,0 @@
/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to keep this file but with just a #include <sys/file.h>

Comment thread include/ioctl.h
@@ -1,44 +0,0 @@
/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to keep this file but with just a #include <sys/ioctl.h>

Comment thread include/kernel.h
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _R3000_H
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this file, r3000.h, is even needed here.

Comment thread include/libmcx.h

/* don't change these macros and structures which is referred in mcx code */

#ifndef TRUE
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so I think these TRUE/FALSE/ERROR are actually used for the return values of the functions in here.

Comment thread include/libpad.h

/* don't change these macros and structures which is referred in controler code */

#ifndef TRUE
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. So we may want to keep these TRUE/FALSE/ERROR blocks, or move them to a new header by itself, like sys/return_values.h, and include it from these two files, as the values are basically implicitly needed to evaluate the return values of the functions. Could also probably do with an enum instead, but that's probably too big of a change.

Comment thread include/types.h
@@ -1,80 +0,0 @@
/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to keep this file but with just a #include <sys/types.h>

Comment thread include/strings.h
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later in this file (as I can't comment somewhere as low), we may want to change this line:

#define strdup(p)	( strcpy(malloc(strlen(p)+1),p); )

to

#define strdup(p)	do { strcpy(malloc(strlen(p)+1),p); } while(0)

@johnbaumann johnbaumann mentioned this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants