@Mick
I also have a look at this, and there is not much missing. Only those ones:
wint_t putwchar (wchar_t wc);
long int wcstol (const wchar_t* str, wchar_t** endptr, int base);
wchar_t* fgetws (wchar_t* ws, int num, FILE* stream);
int vfwprintf (FILE* stream, const wchar_t* format, va_list arg);
int vswprintf (wchar_t * ws, size_t len, const wchar_t * format, va_list arg );
int swprintf( wchar_t* buffer, std::size_t size, const wchar_t* format, ... );
Also our old newlib port miss sys/statvfs.h with fsblkcnt_t support, which is also as above funcions can be added directly to port. Sources:
/*
* Copyright (C) 2016 Eistec AB
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/* If building on native we need to use the system libraries instead */
#ifdef CPU_NATIVE
#pragma GCC system_header
/* without the GCC pragma above #include_next will trigger a pedantic error */
#include_next <sys/statvfs.h >
#else
#ifndef SYS_STATVFS_H
#define SYS_STATVFS_H
#include <sys/types.h> /* for fsblkcnt_t, fsfilcnt_t */
/* newlib support for fsblkcnt_t was only recently added to the newlib git
* repository, commit f3e587d30a9f65d0c6551ad14095300f6e81672e, 15 apr 2016.
* Will be included in release 2.5.0, around new year 2016/2017.
* We provide the below workaround if the used tool chain is too old. */
#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */
#include <stdint.h>
/* Default to 32 bit file sizes on newlib platforms */
typedef uint32_t fsblkcnt_t;
typedef uint32_t fsfilcnt_t;
#define _FSBLKCNT_T_DECLARED
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct statvfs {
unsigned long f_bsize;
unsigned long f_frsize;
fsblkcnt_t f_blocks;
fsblkcnt_t f_bfree;
fsblkcnt_t f_bavail;
fsfilcnt_t f_files;
fsfilcnt_t f_ffree;
fsfilcnt_t f_favail;
unsigned long f_fsid;
unsigned long f_flag;
unsigned long f_namemax;
};
enum {
ST_RDONLY = 1, /* Mount read-only. */
ST_NOSUID = 2, /* Ignore suid and sgid bits. */
};
#ifdef __cplusplus
}
#endif
#endif /* SYS_STATVFS_H */
#endif /* CPU_NATIVE */
Once i define it all, and do little changes in uowners.cpp (replacing lchown on chown), it compile all obects , and want to be linked.
There is my part of makefile as well:
CXX=ppc-amigaos-c++
CXXFLAGS=-O2
DEFINES=-DBIG_ENDIAN -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_BSD_COMPAT
STRIP=ppc-amigaos-strip
AR=ppc-amigaos-ar
LDFLAGS=-static -lz -lstdc++
DESTDIR=/usr
After sources of above functions will be added to port, and all will be links, then there need to be done usuall amiga specific changes (sources of diffs for which i found in morphos and 68k ports of old versions from the page where you download current sources).
In others words, it can be done more or less easy, imho.