Added headers for missing function prototypes.

This commit is contained in:
jshepher 2004-12-04 00:54:21 +00:00
parent 6a0d455dd0
commit 37223e0cb9
3 changed files with 30 additions and 27 deletions

View File

@ -1,4 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
void __eprintf(const char *format,...) /* for asserts */

View File

@ -1,37 +1,38 @@
#include <proto/dos.h>
#include <stdlib.h>
#include <unistd.h>
#include <proto/dos.h>
#include <errno.h>
#include <string.h>
int readlink(const char *path, char *buf, int bufsiz) {
struct DevProc *dp = NULL;
BPTR lock = NULL;
int retval = -1;
int readlink(const char *path, char *buf, int bufsiz)
{
struct DevProc *dp = NULL;
BPTR lock = NULL;
int retval = -1;
lock = Open(path, MODE_OLDFILE);
if (lock == NULL) {
errno = ENOENT;
goto done;
}
lock = Open(path, MODE_OLDFILE);
if (lock == NULL) {
errno = ENOENT;
goto done;
}
dp = GetDeviceProc(path, NULL);
if (dp == NULL) {
errno = EINVAL;
goto done;
}
dp = GetDeviceProc(path, NULL);
if (dp == NULL) {
errno = EINVAL;
goto done;
}
retval = ReadLink(dp->dvp_Port, lock, path, buf, bufsiz);
if (retval == TRUE)
retval = strlen(buf);
else
retval = -1;
retval = ReadLink(dp->dvp_Port, lock, path, buf, bufsiz);
if (retval == TRUE)
retval = strlen(buf);
else
retval = -1;
done:
if (dp != NULL)
FreeDeviceProc(dp);
if (lock != NULL)
UnLock(lock);
return retval;
if (dp != NULL)
FreeDeviceProc(dp);
if (lock != NULL)
UnLock(lock);
return retval;
}

View File

@ -1,3 +1,4 @@
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>