mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
Compare commits
49 Commits
make-clean
...
V1_215
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c02665938f | ||
|
|
1e2863c5b8 | ||
|
|
e1da3dadfb | ||
|
|
b51c79577e | ||
|
|
975f949aa1 | ||
|
|
5f14118d73 | ||
|
|
b874ff71de | ||
|
|
397013922c | ||
|
|
85c36839d5 | ||
|
|
196d37b28a | ||
|
|
e8086be768 | ||
|
|
82dd474e3b | ||
|
|
58f36203b1 | ||
|
|
425f899302 | ||
|
|
febe89c61b | ||
|
|
3e50be491b | ||
|
|
dfc7f310d6 | ||
|
|
a6a9352a00 | ||
|
|
eb1d784c0d | ||
|
|
d1092099d0 | ||
|
|
bc621bed9c | ||
|
|
60eebbe732 | ||
|
|
345995000a | ||
|
|
ef18bf5f3e | ||
|
|
6f3b3b6d28 | ||
|
|
846eebc66c | ||
|
|
75d47ccdad | ||
|
|
456123fe7f | ||
|
|
5733c99ba1 | ||
|
|
391e7e39ad | ||
|
|
f5f0e17e78 | ||
|
|
f6f0082a0e | ||
|
|
c84b1fc1ff | ||
|
|
e35307a7e3 | ||
|
|
911114c286 | ||
|
|
9e998ca108 | ||
|
|
99695dec0b | ||
|
|
0ec7094877 | ||
|
|
a471e73adf | ||
|
|
c76bf8e20b | ||
|
|
309bbd8c8c | ||
|
|
d6e5769bc5 | ||
|
|
976b6ae7e1 | ||
|
|
8af96cb6cb | ||
|
|
febe690623 | ||
|
|
e36ebff16e | ||
|
|
6a1fd36b3a | ||
|
|
feebeb6751 | ||
|
|
1b2c798467 |
@@ -1,14 +0,0 @@
|
||||
---
|
||||
engines:
|
||||
duplication:
|
||||
enabled: false
|
||||
fixme:
|
||||
enabled: true
|
||||
markdownlint:
|
||||
enabled: true
|
||||
ratings:
|
||||
paths:
|
||||
- "**.c"
|
||||
- "**.h"
|
||||
- "**.l"
|
||||
- "**.md"
|
||||
54
.github/workflows/ci.yml
vendored
Normal file
54
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 480
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [os4, os3]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: setup dependencies
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -y -qq || true
|
||||
sudo apt-get -qq install libc6:i386
|
||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
|
||||
|
||||
- name: setup env
|
||||
run : |
|
||||
echo "GITHUB_SHA7=$(echo ${GITHUB_SHA::7})" >>$GITHUB_ENV
|
||||
|
||||
- name: install adtools build env
|
||||
run: |
|
||||
DOWNLOAD_PATH=https://github.com/adtools/adtools/releases/download/20170213
|
||||
curl -L ${DOWNLOAD_PATH}/adtools-utils.tar.bz2 | sudo tar xj -C /
|
||||
if [[ ${{ matrix.platform }} =~ os3 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-m68k-amigaos.tar.bz2 | sudo tar xj -C / ; fi
|
||||
if [[ ${{ matrix.platform }} =~ os4 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-ppc-amigaos.tar.bz2 | sudo tar xj -C / ; fi
|
||||
if [[ ${{ matrix.platform }} =~ mos ]]; then curl -L ${DOWNLOAD_PATH}/adtools-ppc-morphos.tar.bz2 | sudo tar xj -C / ; fi
|
||||
if [[ ${{ matrix.platform }} =~ aros-ppc ]]; then curl -L ${DOWNLOAD_PATH}/adtools-ppc-aros.tar.bz2 | sudo tar xj -C / ; fi
|
||||
if [[ ${{ matrix.platform }} =~ aros-i386 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-i386-aros.tar.bz2 | sudo tar xj -C / ; fi
|
||||
if [[ ${{ matrix.platform }} =~ aros-x86_64 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-x86_64-aros.tar.bz2 | sudo tar xj -C / ; fi
|
||||
|
||||
- name: cleanup old action artifacts
|
||||
run: .github/workflows/purge_artifacts.sh ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
#- name: remote debug tmate session
|
||||
# uses: mxschmitt/action-tmate@v1
|
||||
# if: matrix.platform == 'os4'
|
||||
|
||||
- name: build [${{ matrix.platform }}]
|
||||
timeout-minutes: 480
|
||||
run: |
|
||||
export PATH=/usr/local/amiga/bin:/opt/m68k-amigaos/bin:/opt/ppc-amigaos/bin:/opt/ppc-morphos/bin:${PATH}
|
||||
if [[ ${{ matrix.platform }} =~ os4 ]]; then make -C library -j1 -f GNUmakefile.os4 OS=os4 ; fi
|
||||
if [[ ${{ matrix.platform }} =~ os3 ]]; then make -C library -j1 -f GNUmakefile.68k OS=os3 ; fi
|
||||
55
.github/workflows/purge_artifacts.sh
vendored
Executable file
55
.github/workflows/purge_artifacts.sh
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Customize those three lines with your repository and credentials:
|
||||
REPO=https://api.github.com/repos/${GITHUB_REPOSITORY}
|
||||
GITHUB_USER=${GITHUB_REPOSITORY%%/*}
|
||||
GITHUB_TOKEN=${1}
|
||||
|
||||
# Number of most recent versions to keep for each artifact:
|
||||
KEEP=4
|
||||
|
||||
# A shortcut to call GitHub API.
|
||||
ghapi() { curl --silent --location --user $GITHUB_USER:$GITHUB_TOKEN "$@"; }
|
||||
|
||||
# A temporary file which receives HTTP response headers.
|
||||
TMPFILE=/tmp/tmp.$$
|
||||
|
||||
# An associative array, key: artifact name, value: number of artifacts of that name.
|
||||
declare -A ARTCOUNT
|
||||
|
||||
# Process all artifacts on this repository, loop on returned "pages".
|
||||
URL=$REPO/actions/artifacts
|
||||
while [[ -n "$URL" ]]; do
|
||||
|
||||
# Get current page, get response headers in a temporary file.
|
||||
JSON=$(ghapi --dump-header $TMPFILE "$URL")
|
||||
|
||||
# Get URL of next page. Will be empty if we are at the last page.
|
||||
URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*<//' -e 's/>.*//')
|
||||
rm -f ${TMPFILE}
|
||||
|
||||
# Number of artifacts on this page:
|
||||
COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') ))
|
||||
|
||||
# Loop on all artifacts on this page.
|
||||
for ((i=0; $i < $COUNT; i++)); do
|
||||
|
||||
# Get name of artifact and count instances of this name.
|
||||
STR=$(jq <<<$JSON -r ".artifacts[$i].name?")
|
||||
name=${STR%%-*}-${STR##*-}
|
||||
ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1))
|
||||
|
||||
printf "Found '%s' #%d, " $STR ${ARTCOUNT[$name]}
|
||||
# Check if we must delete this one.
|
||||
if [[ ${ARTCOUNT[$name]} -gt $KEEP ]]; then
|
||||
id=$(jq <<<$JSON -r ".artifacts[$i].id?")
|
||||
size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") ))
|
||||
printf "deleting %d bytes\n" $size
|
||||
ghapi -X DELETE $REPO/actions/artifacts/$id
|
||||
else
|
||||
printf "OK\n"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
exit 0
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,4 +2,4 @@
|
||||
*.a
|
||||
/library/compiler.log
|
||||
/library/netinclude
|
||||
*~
|
||||
*.map
|
||||
|
||||
36
.travis.yml
36
.travis.yml
@@ -1,36 +0,0 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
language: c
|
||||
|
||||
# download and install our required cross compilers
|
||||
install:
|
||||
# Make sure we can install i386 packages as some adtools binaries
|
||||
# requires i386 libraries being installed to work in the 64bit env
|
||||
# of Travis
|
||||
- sudo dpkg --add-architecture i386
|
||||
- sudo apt-get -qq update || true
|
||||
- sudo apt-get -qq install libc6:i386
|
||||
# Install all adtools related stuff we need
|
||||
- curl -L https://dl.bintray.com/jens-maus/adtools/adtools-utils.tar.bz2 | sudo tar xj -C /
|
||||
- if [[ ${BUILD} =~ os3|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-m68k-amigaos.tar.bz2 | sudo tar xj -C / ; fi
|
||||
- if [[ ${BUILD} =~ os4|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-ppc-amigaos.tar.bz2 | sudo tar xj -C / ; fi
|
||||
- if [[ ${BUILD} =~ mos|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-ppc-morphos.tar.bz2 | sudo tar xj -C / ; fi
|
||||
- if [[ ${BUILD} =~ aros-ppc|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-ppc-aros.tar.bz2 | sudo tar xj -C / ; fi
|
||||
- if [[ ${BUILD} =~ aros-i386|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-i386-aros.tar.bz2 | sudo tar xj -C / ; fi
|
||||
- if [[ ${BUILD} =~ aros-x86_64|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-x86_64-aros.tar.bz2 | sudo tar xj -C / ; fi
|
||||
- if [[ ${BUILD} =~ mingw32|release ]]; then sudo apt-get -qq install binutils-mingw-w64-i686 gcc-mingw-w64-i686 ; fi
|
||||
|
||||
# set the PATH variable to the directories the cross compilers are installed.
|
||||
before_script:
|
||||
- export PATH=/usr/local/amiga/bin:/opt/m68k-amigaos/bin:/opt/ppc-amigaos/bin:/opt/ppc-morphos/bin:${PATH}
|
||||
|
||||
# specify a list of variables to test (here we test the build for our supported
|
||||
# list of operating systems).
|
||||
env:
|
||||
- BUILD="-f GNUmakefile.68k OS=os3"
|
||||
- BUILD="-f GNUmakefile.os4 OS=os4"
|
||||
|
||||
# the build command to execute for each test
|
||||
script:
|
||||
- make -C library -j1 ${BUILD}
|
||||
@@ -1,9 +1,7 @@
|
||||
# clib2 – An ISO 'C' (1994) compliant runtime library for AmigaOS
|
||||
|
||||
[](https://travis-ci.org/adtools/clib2)
|
||||
[](https://codeclimate.com/github/adtools/clib2)
|
||||
[](https://github.com/adtools/clib2/actions)
|
||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||
[](https://github.com/adtools/clib2/issues)
|
||||
|
||||
## What is this?
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# $Id: GNUmakefile.68k,v 1.107 2010-10-20 13:50:16 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
@@ -138,16 +138,815 @@ CFLAGS = \
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libamiga.obj.gmk
|
||||
include libc.obj.gmk
|
||||
include libdebug.obj.gmk
|
||||
include libm.obj.gmk
|
||||
include libnet.obj.gmk
|
||||
include libunix.obj.gmk
|
||||
C_LIB = \
|
||||
c.lib_rev.o \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
ctype_islower.o \
|
||||
ctype_isprint.o \
|
||||
ctype_ispunct.o \
|
||||
ctype_isspace.o \
|
||||
ctype_isupper.o \
|
||||
ctype_isxdigit.o \
|
||||
ctype_table.o \
|
||||
ctype_tolower.o \
|
||||
ctype_toupper.o \
|
||||
dirent_closedir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
dirent_rewinddir.o \
|
||||
errno_data.o \
|
||||
fcntl_close.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_get_default_file.o \
|
||||
fcntl_lock.o \
|
||||
fcntl_lseek.o \
|
||||
fcntl_open.o \
|
||||
fcntl_read.o \
|
||||
fcntl_write.o \
|
||||
ftw_ftw.o \
|
||||
ftw_nftw.o \
|
||||
inttypes_imaxdiv.o \
|
||||
inttypes_imaxabs.o \
|
||||
inttypes_strtoimax.o \
|
||||
inttypes_strtoumax.o \
|
||||
libgen_basename.o \
|
||||
libgen_dirname.o \
|
||||
locale_init_exit.o \
|
||||
locale_localeconv.o \
|
||||
locale_open_locale.o \
|
||||
locale_setlocale.o \
|
||||
mount_convertinfo.o \
|
||||
mount_fstatfs.o \
|
||||
mount_statfs.o \
|
||||
signal_checkabort.o \
|
||||
signal_data.o \
|
||||
signal_kill.o \
|
||||
signal_mask.o \
|
||||
signal_raise.o \
|
||||
signal_sigaddset.o \
|
||||
signal_sigblock.o \
|
||||
signal_sigemptyset.o \
|
||||
signal_sigmask.o \
|
||||
signal_signal.o \
|
||||
signal_sigprocmask.o \
|
||||
signal_sigsetmask.o \
|
||||
stat_chmod.o \
|
||||
stat_convertfileinfo.o \
|
||||
stat_fchmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stat_umask.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_change_fd_action.o \
|
||||
stdio_change_fd_user_data.o \
|
||||
stdio_clearerr.o \
|
||||
stdio_dropiobreadbuffer.o \
|
||||
stdio_duplicate_fd.o \
|
||||
stdio_examine_fh.o \
|
||||
stdio_fclose.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_feof.o \
|
||||
stdio_ferror.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fgetc.o \
|
||||
stdio_fgetpos.o \
|
||||
stdio_fgets.o \
|
||||
stdio_filliobreadbuffer.o \
|
||||
stdio_findvacantfdentry.o \
|
||||
stdio_findvacantiobentry.o \
|
||||
stdio_flockfile.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_flushiobwritebuffer.o \
|
||||
stdio_fopen.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fputc.o \
|
||||
stdio_fputs.o \
|
||||
stdio_fread.o \
|
||||
stdio_freopen.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_fseek.o \
|
||||
stdio_fseeko.o \
|
||||
stdio_fsetpos.o \
|
||||
stdio_ftell.o \
|
||||
stdio_ftello.o \
|
||||
stdio_ftrylockfile.o \
|
||||
stdio_funlockfile.o \
|
||||
stdio_fwrite.o \
|
||||
stdio_getc.o \
|
||||
stdio_getc_unlocked.o \
|
||||
stdio_getchar.o \
|
||||
stdio_getchar_unlocked.o \
|
||||
stdio_gets.o \
|
||||
stdio_get_fd.o \
|
||||
stdio_get_file_descriptor.o \
|
||||
stdio_growfdtable.o \
|
||||
stdio_growiobtable.o \
|
||||
stdio_grow_file.o \
|
||||
stdio_initializefd.o \
|
||||
stdio_initializeiob.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_iobhookentry.o \
|
||||
stdio_lock.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_nostdio.o \
|
||||
stdio_openiob.o \
|
||||
stdio_parent_of_fh.o \
|
||||
stdio_perror.o \
|
||||
stdio_popen.o \
|
||||
stdio_printf.o \
|
||||
stdio_putc.o \
|
||||
stdio_putc_unlocked.o \
|
||||
stdio_putchar.o \
|
||||
stdio_putchar_unlocked.o \
|
||||
stdio_puts.o \
|
||||
stdio_remove.o \
|
||||
stdio_remove_fd_alias.o \
|
||||
stdio_rename.o \
|
||||
stdio_resolve_fd_file.o \
|
||||
stdio_rewind.o \
|
||||
stdio_scanf.o \
|
||||
stdio_setbuf.o \
|
||||
stdio_setvbuf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_sscanf_hook_entry.o \
|
||||
stdio_tmpfile.o \
|
||||
stdio_tmpnam.o \
|
||||
stdio_translateioerror.o \
|
||||
stdio_ungetc.o \
|
||||
stdio_unlockfile.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vasprintf_hook_entry.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsnprintf_hook_entry.o \
|
||||
stdio_vsprintf.o \
|
||||
stdio_vsprintf_hook_entry.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdlib_abort.o \
|
||||
stdlib_abs.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_assertion_failure.o \
|
||||
stdlib_atexit.o \
|
||||
stdlib_atoi.o \
|
||||
stdlib_atol.o \
|
||||
stdlib_atoll.o \
|
||||
stdlib_bsearch.o \
|
||||
stdlib_calloc.o \
|
||||
stdlib_checkdetach.o \
|
||||
stdlib_constructor.o \
|
||||
stdlib_constructor_begin.o \
|
||||
stdlib_default_pool_size.o \
|
||||
stdlib_default_puddle_size.o \
|
||||
stdlib_destructor.o \
|
||||
stdlib_detach.o \
|
||||
stdlib_disablerequesters.o \
|
||||
stdlib_div.o \
|
||||
stdlib_divsi3.o \
|
||||
stdlib_divsi4.o \
|
||||
stdlib_dosbase.o \
|
||||
stdlib_exit.o \
|
||||
stdlib_free.o \
|
||||
stdlib_free_unused_slabs.o \
|
||||
stdlib_decay_unused_slabs.o \
|
||||
stdlib_getdefstacksize.o \
|
||||
stdlib_getenv.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_getsp.o \
|
||||
stdlib_get_errno.o \
|
||||
stdlib_get_slab_usage.o \
|
||||
stdlib_get_slab_allocations.o \
|
||||
stdlib_get_slab_stats.o \
|
||||
stdlib_isresident.o \
|
||||
stdlib_labs.o \
|
||||
stdlib_llabs.o \
|
||||
stdlib_ldiv.o \
|
||||
stdlib_lldiv.o \
|
||||
stdlib_lib_main.o \
|
||||
stdlib_lib_startup.o \
|
||||
stdlib_machine_test.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_math.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_modsi3.o \
|
||||
stdlib_mulsi3.o \
|
||||
stdlib_never_free.o \
|
||||
stdlib_osliberror.o \
|
||||
stdlib_oslibversion.o \
|
||||
stdlib_priority.o \
|
||||
stdlib_process_name.o \
|
||||
stdlib_program_name.o \
|
||||
stdlib_putenv.o \
|
||||
stdlib_qsort.o \
|
||||
stdlib_rand.o \
|
||||
stdlib_rand_r.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_red_black.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_semaphore.o \
|
||||
stdlib_setenv.o \
|
||||
stdlib_setjmp.o \
|
||||
stdlib_set_errno.o \
|
||||
stdlib_set_process_window.o \
|
||||
stdlib_shell_escape.o \
|
||||
stdlib_showerror.o \
|
||||
stdlib_slab.o \
|
||||
stdlib_slab_max_size.o \
|
||||
stdlib_slab_purge_threshold.o \
|
||||
stdlib_srand.o \
|
||||
stdlib_stacksize.o \
|
||||
stdlib_stack_usage.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_stdio_window_spec.o \
|
||||
stdlib_strtol.o \
|
||||
stdlib_strtoll.o \
|
||||
stdlib_strtoul.o \
|
||||
stdlib_strtoull.o \
|
||||
stdlib_swapstack.o \
|
||||
stdlib_sysbase.o \
|
||||
stdlib_system.o \
|
||||
stdlib_termination_message.o \
|
||||
stdlib_threshold.o \
|
||||
stdlib_utilitybase.o \
|
||||
stdlib_udivsi3.o \
|
||||
stdlib_udivsi4.o \
|
||||
stdlib_umodsi3.o \
|
||||
stdlib_unsetenv.o \
|
||||
strings_ffs.o \
|
||||
strings_strcasecmp.o \
|
||||
strings_strncasecmp.o \
|
||||
string_bcmp.o \
|
||||
string_bcopy.o \
|
||||
string_bzero.o \
|
||||
string_index.o \
|
||||
string_memchr.o \
|
||||
string_memcmp.o \
|
||||
string_memcpy.o \
|
||||
string_memmove.o \
|
||||
string_memset.o \
|
||||
string_rindex.o \
|
||||
string_strcat.o \
|
||||
string_strchr.o \
|
||||
string_strcmp.o \
|
||||
string_strcoll.o \
|
||||
string_strcpy.o \
|
||||
string_strcspn.o \
|
||||
string_strdup.o \
|
||||
string_strerror.o \
|
||||
string_strerror_r.o \
|
||||
string_strlcat.o \
|
||||
string_strlcpy.o \
|
||||
string_strlen.o \
|
||||
string_strncat.o \
|
||||
string_strncmp.o \
|
||||
string_strncpy.o \
|
||||
string_strpbrk.o \
|
||||
string_strrchr.o \
|
||||
string_strspn.o \
|
||||
string_strstr.o \
|
||||
string_strtok.o \
|
||||
string_strtok_r.o \
|
||||
string_strxfrm.o \
|
||||
time_asctime.o \
|
||||
time_asctime_r.o \
|
||||
time_clock.o \
|
||||
time_converttime.o \
|
||||
time_convert_datestamp.o \
|
||||
time_convert_time.o \
|
||||
time_ctime.o \
|
||||
time_ctime_r.o \
|
||||
time_data.o \
|
||||
time_days_per_date.o \
|
||||
time_gettimeofday.o \
|
||||
time_gmtime.o \
|
||||
time_gmtime_r.o \
|
||||
time_localtime.o \
|
||||
time_localtime_r.o \
|
||||
time_mktime.o \
|
||||
time_numbertostring.o \
|
||||
time_strftime.o \
|
||||
time_time.o \
|
||||
time_tzset.o \
|
||||
time_weekday.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
ulimit_ulimit.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_currentpathname.o \
|
||||
unistd_dup.o \
|
||||
unistd_dup2.o \
|
||||
unistd_fchown.o \
|
||||
unistd_fdatasync.o \
|
||||
unistd_fdopen.o \
|
||||
unistd_fileno.o \
|
||||
unistd_fsync.o \
|
||||
unistd_ftruncate.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_getopt.o \
|
||||
unistd_getpid.o \
|
||||
unistd_init_exit.o \
|
||||
unistd_isatty.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_sleep.o \
|
||||
unistd_symlink.o \
|
||||
unistd_sync_fd.o \
|
||||
unistd_timer.o \
|
||||
unistd_time_delay.o \
|
||||
unistd_truncate.o \
|
||||
unistd_unlink.o \
|
||||
unistd_unlink_retries.o \
|
||||
unistd_usleep.o \
|
||||
utime_utime.o \
|
||||
utsname_uname.o
|
||||
|
||||
AMIGA_LIB := $(sort $(AMIGA_LIB_COMMON) $(AMIGA_LIB_OS3))
|
||||
C_LIB := $(sort $(C_LIB_COMMON) $(C_LIB_OS3))
|
||||
UNIX_LIB := $(sort $(UNIX_LIB_COMMON) $(UNIX_LIB_OS3))
|
||||
UNIX_LIB = \
|
||||
unix.lib_rev.o \
|
||||
dirent_closedir.o \
|
||||
dirent_rewinddir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_open.o \
|
||||
fcntl_get_default_file.o \
|
||||
getopt_getopt_long.o \
|
||||
mount_convertinfo.o \
|
||||
mount_statfs.o \
|
||||
resource_getrlimit.o \
|
||||
resource_setrlimit.o \
|
||||
stat_chmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stdio_ctermid.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fopen.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_openiob.o \
|
||||
stdio_popen.o \
|
||||
stdio_record_locking.o \
|
||||
stdio_remove.o \
|
||||
stdio_rename.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_expand_wildcard.o \
|
||||
stdlib_expand_wildcard_check.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_system.o \
|
||||
systeminfo_sysinfo.o \
|
||||
termios_cfgetispeed.o \
|
||||
termios_cfgetospeed.o \
|
||||
termios_cfmakeraw.o \
|
||||
termios_cfsetispeed.o \
|
||||
termios_cfsetospeed.o \
|
||||
termios_console_fdhookentry.o \
|
||||
termios_tcdrain.o \
|
||||
termios_tcflow.o \
|
||||
termios_tcflush.o \
|
||||
termios_tcgetattr.o \
|
||||
termios_tcsendbreak.o \
|
||||
termios_tcsetattr.o \
|
||||
timeb_ftime.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_common_pathconf.o \
|
||||
unistd_def_path.o \
|
||||
unistd_def_path_delimiter.o \
|
||||
unistd_environ.o \
|
||||
unistd_execl.o \
|
||||
unistd_execle.o \
|
||||
unistd_execlp.o \
|
||||
unistd_execv.o \
|
||||
unistd_execve.o \
|
||||
unistd_execve_env_exit.o \
|
||||
unistd_execve_env_init.o \
|
||||
unistd_execve_exit.o \
|
||||
unistd_execvp.o \
|
||||
unistd_fpathconf.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_pathconf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_restorepathname.o \
|
||||
unistd_setcurrentpath.o \
|
||||
unistd_strip_double_slash.o \
|
||||
unistd_symlink.o \
|
||||
unistd_translatea2u.o \
|
||||
unistd_translaterel.o \
|
||||
unistd_translateu2a.o \
|
||||
unistd_truncate.o \
|
||||
unistd_ttyname.o \
|
||||
unistd_ttyname_r.o \
|
||||
unistd_unix_path_semantics.o \
|
||||
unistd_unlink.o \
|
||||
unistd_wildcard_expand.o \
|
||||
utime_utime.o
|
||||
|
||||
MATH_LIB = \
|
||||
complex_carg.o \
|
||||
complex_cargf.o \
|
||||
complex_cargl.o \
|
||||
complex_cimag.o \
|
||||
complex_cimagf.o \
|
||||
complex_cimagl.o \
|
||||
complex_conj.o \
|
||||
complex_conjf.o \
|
||||
complex_conjl.o \
|
||||
complex_creal.o \
|
||||
complex_crealf.o \
|
||||
complex_creall.o \
|
||||
fenv_feclearexcept.o \
|
||||
fenv_fegetenv.o \
|
||||
fenv_fegetexceptflag.o \
|
||||
fenv_fegetround.o \
|
||||
fenv_feholdexcept.o \
|
||||
fenv_feraiseexcept.o \
|
||||
fenv_fesetenv.o \
|
||||
fenv_fesetexceptflag.o \
|
||||
fenv_fetestexcept.o \
|
||||
fenv_fetestround.o \
|
||||
fenv_feupdateenv.o \
|
||||
math_acos.o \
|
||||
math_acosf.o \
|
||||
math_acosh.o \
|
||||
math_acoshf.o \
|
||||
math_asin.o \
|
||||
math_asinf.o \
|
||||
math_asinh.o \
|
||||
math_asinhf.o \
|
||||
math_atan.o \
|
||||
math_atan2.o \
|
||||
math_atan2f.o \
|
||||
math_atanf.o \
|
||||
math_atanh.o \
|
||||
math_atanhf.o \
|
||||
math_cbrt.o \
|
||||
math_cbrtf.o \
|
||||
math_ceil.o \
|
||||
math_ceilf.o \
|
||||
math_copysign.o \
|
||||
math_copysignf.o \
|
||||
math_cos.o \
|
||||
math_cosf.o \
|
||||
math_cosh.o \
|
||||
math_coshf.o \
|
||||
math_erf.o \
|
||||
math_erfc.o \
|
||||
math_erfcf.o \
|
||||
math_erff.o \
|
||||
math_exp.o \
|
||||
math_exp2.o \
|
||||
math_exp2f.o \
|
||||
math_expf.o \
|
||||
math_expm1.o \
|
||||
math_expm1f.o \
|
||||
math_fabs.o \
|
||||
math_fabsf.o \
|
||||
math_fdim.o \
|
||||
math_fdimf.o \
|
||||
math_floor.o \
|
||||
math_floorf.o \
|
||||
math_fma.o \
|
||||
math_fmaf.o \
|
||||
math_fmax.o \
|
||||
math_fmaxf.o \
|
||||
math_fmin.o \
|
||||
math_fminf.o \
|
||||
math_fmod.o \
|
||||
math_fmodf.o \
|
||||
math_fpclassify.o \
|
||||
math_frexp.o \
|
||||
math_frexpf.o \
|
||||
math_huge_val.o \
|
||||
math_huge_valf.o \
|
||||
math_hypot.o \
|
||||
math_hypotf.o \
|
||||
math_ilogb.o \
|
||||
math_ilogbf.o \
|
||||
math_inf.o \
|
||||
math_inff.o \
|
||||
math_init_exit.o \
|
||||
math_isfinite.o \
|
||||
math_isunordered.o \
|
||||
math_kernel_cosf.o \
|
||||
math_kernel_sinf.o \
|
||||
math_kernel_tanf.o \
|
||||
math_ldexp.o \
|
||||
math_ldexpf.o \
|
||||
math_lgamma.o \
|
||||
math_lgammaf.o \
|
||||
math_llrint.o \
|
||||
math_log.o \
|
||||
math_log10.o \
|
||||
math_log10f.o \
|
||||
math_log1p.o \
|
||||
math_log1pf.o \
|
||||
math_log2.o \
|
||||
math_log2f.o \
|
||||
math_logb.o \
|
||||
math_logbf.o \
|
||||
math_logf.o \
|
||||
math_lrint.o \
|
||||
math_lrintf.o \
|
||||
math_lround.o \
|
||||
math_lroundf.o \
|
||||
math_modf.o \
|
||||
math_modff.o \
|
||||
math_nan.o \
|
||||
math_nanf.o \
|
||||
math_nearbyint.o \
|
||||
math_nearbyintf.o \
|
||||
math_nextafter.o \
|
||||
math_nextafterf.o \
|
||||
math_pow.o \
|
||||
math_powf.o \
|
||||
math_remainder.o \
|
||||
math_remainderf.o \
|
||||
math_remquo.o \
|
||||
math_remquof.o \
|
||||
math_rem_pio2f.o \
|
||||
math_rint.o \
|
||||
math_rintf.o \
|
||||
math_round.o \
|
||||
math_roundf.o \
|
||||
math_scalbn.o \
|
||||
math_scalbnf.o \
|
||||
math_signbit.o \
|
||||
math_sin.o \
|
||||
math_sinf.o \
|
||||
math_sinh.o \
|
||||
math_sinhf.o \
|
||||
math_sqrt.o \
|
||||
math_sqrtf.o \
|
||||
math_tan.o \
|
||||
math_tanf.o \
|
||||
math_tanh.o \
|
||||
math_tanhf.o \
|
||||
math_tgamma.o \
|
||||
math_tgammaf.o \
|
||||
math_trunc.o \
|
||||
math_truncf.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_printf.o \
|
||||
stdio_scanf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsprintf.o \
|
||||
stdlib_atof.o \
|
||||
stdlib_strtod.o \
|
||||
stdlib_strtof.o \
|
||||
time_difftime.o
|
||||
|
||||
MATH_LIB_881 = \
|
||||
m881.lib_rev.o \
|
||||
$(MATH_LIB)
|
||||
|
||||
MATH_LIB_IEEE = \
|
||||
m.lib_rev.o \
|
||||
$(MATH_LIB) \
|
||||
math_adddf3.o \
|
||||
math_addsf3.o \
|
||||
math_divdf3.o \
|
||||
math_divsf3.o \
|
||||
math_eqdf2.o \
|
||||
math_eqsf2.o \
|
||||
math_extendsfdf2.o \
|
||||
math_fixdfsi.o \
|
||||
math_fixsfsi.o \
|
||||
math_fixunsdfsi.o \
|
||||
math_fixunssfsi.o \
|
||||
math_floatsidf.o \
|
||||
math_floatsisf.o \
|
||||
math_gedf2.o \
|
||||
math_gesf2.o \
|
||||
math_gtdf2.o \
|
||||
math_gtsf2.o \
|
||||
math_ledf2.o \
|
||||
math_lesf2.o \
|
||||
math_ltdf2.o \
|
||||
math_ltsf2.o \
|
||||
math_muldf3.o \
|
||||
math_mulsf3.o \
|
||||
math_nedf2.o \
|
||||
math_negdf2.o \
|
||||
math_negsf2.o \
|
||||
math_nesf2.o \
|
||||
math_subdf3.o \
|
||||
math_subsf3.o \
|
||||
math_truncdfsf2.o
|
||||
|
||||
NET_LIB = \
|
||||
net.lib_rev.o \
|
||||
socket_accept.o \
|
||||
socket_bind.o \
|
||||
socket_check_daemon.o \
|
||||
socket_connect.o \
|
||||
socket_gethostbyaddr.o \
|
||||
socket_gethostbyname.o \
|
||||
socket_gethostid.o \
|
||||
socket_gethostname.o \
|
||||
socket_getnetbyaddr.o \
|
||||
socket_getnetbyname.o \
|
||||
socket_getpeername.o \
|
||||
socket_getprotobyname.o \
|
||||
socket_getprotobynumber.o \
|
||||
socket_getservbyname.o \
|
||||
socket_getservbyport.o \
|
||||
socket_getsockname.o \
|
||||
socket_getsockopt.o \
|
||||
socket_get_descriptor.o \
|
||||
socket_inet_addr.o \
|
||||
socket_inet_aton.o \
|
||||
socket_inet_lnaof.o \
|
||||
socket_inet_makeaddr.o \
|
||||
socket_inet_netof.o \
|
||||
socket_inet_network.o \
|
||||
socket_inet_ntoa.o \
|
||||
socket_init_exit.o \
|
||||
socket_ioctl.o \
|
||||
socket_isdaemon.o \
|
||||
socket_listen.o \
|
||||
socket_obtain_daemon.o \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
socket_setsockopt.o \
|
||||
socket_shutdown.o \
|
||||
socket_socket.o \
|
||||
socket_hook_entry.o \
|
||||
socket_hstrerror.o \
|
||||
socket_get_h_errno.o \
|
||||
socket_set_h_errno.o \
|
||||
stat_umask.o \
|
||||
systeminfo_sysinfo.o \
|
||||
usergroup_crypt.o \
|
||||
usergroup_data.o \
|
||||
usergroup_endgrent.o \
|
||||
usergroup_endpwent.o \
|
||||
usergroup_getegid.o \
|
||||
usergroup_geteuid.o \
|
||||
usergroup_getgid.o \
|
||||
usergroup_getgrent.o \
|
||||
usergroup_getgrgid.o \
|
||||
usergroup_getgrnam.o \
|
||||
usergroup_getgroups.o \
|
||||
usergroup_getpass.o \
|
||||
usergroup_getpwent.o \
|
||||
usergroup_getpwnam.o \
|
||||
usergroup_getpwuid.o \
|
||||
usergroup_getuid.o \
|
||||
usergroup_initgroups.o \
|
||||
usergroup_init_exit.o \
|
||||
usergroup_rootmode.o \
|
||||
usergroup_setegid.o \
|
||||
usergroup_seteuid.o \
|
||||
usergroup_setgid.o \
|
||||
usergroup_setgrent.o \
|
||||
usergroup_setgroups.o \
|
||||
usergroup_setpwent.o \
|
||||
usergroup_setregid.o \
|
||||
usergroup_setreuid.o \
|
||||
usergroup_setsid.o \
|
||||
usergroup_setuid.o \
|
||||
utsname_uname.o
|
||||
|
||||
DEBUG_LIB = \
|
||||
debug.lib_rev.o \
|
||||
debug.o \
|
||||
debug_cmpstrexec.o \
|
||||
debug_kcmpstr.o \
|
||||
debug_kdofmt.o \
|
||||
debug_kgetc.o \
|
||||
debug_kgetch1.o \
|
||||
debug_kgetch2.o \
|
||||
debug_kgetchar1.o \
|
||||
debug_kgetchar2.o \
|
||||
debug_kgetnum1.o \
|
||||
debug_kgetnum2.o \
|
||||
debug_kmaygetch.o \
|
||||
debug_kmaygetchar.o \
|
||||
debug_kprintf1.o \
|
||||
debug_kprintf2.o \
|
||||
debug_kputc.o \
|
||||
debug_kputch1.o \
|
||||
debug_kputch2.o \
|
||||
debug_kputchar1.o \
|
||||
debug_kputchar2.o \
|
||||
debug_kputfmt.o \
|
||||
debug_kputs1.o \
|
||||
debug_kputs2.o \
|
||||
debug_kputstr1.o \
|
||||
debug_kputstr2.o \
|
||||
debug_kvprintf1.o \
|
||||
debug_kvprintf2.o \
|
||||
debug_level.o
|
||||
|
||||
AMIGA_LIB = \
|
||||
amiga.lib_rev.o \
|
||||
amiga_acrypt.o \
|
||||
amiga_addtof.o \
|
||||
amiga_argarraydone.o \
|
||||
amiga_argarrayinit.o \
|
||||
amiga_argint.o \
|
||||
amiga_argstring.o \
|
||||
amiga_beginio.o \
|
||||
amiga_callhook.o \
|
||||
amiga_callhooka.o \
|
||||
amiga_coercemethod.o \
|
||||
amiga_createextio.o \
|
||||
amiga_createport.o \
|
||||
amiga_createstdio.o \
|
||||
amiga_createtask.o \
|
||||
amiga_deleteextio.o \
|
||||
amiga_deleteport.o \
|
||||
amiga_deletestdio.o \
|
||||
amiga_deletetask.o \
|
||||
amiga_domethod.o \
|
||||
amiga_dosupermethod.o \
|
||||
amiga_dotimer.o \
|
||||
amiga_fastrand.o \
|
||||
amiga_freeievents.o \
|
||||
amiga_hookentry.o \
|
||||
amiga_hotkey.o \
|
||||
amiga_invertstring.o \
|
||||
amiga_newlist.o \
|
||||
amiga_rangerand.o \
|
||||
amiga_remtof.o \
|
||||
amiga_rexxvars.o \
|
||||
amiga_setsuperattrs.o \
|
||||
amiga_timedelay.o \
|
||||
amiga_waitbeam.o
|
||||
|
||||
MEMDEBUG_LIB = \
|
||||
stdio_vasprintf_debug.o \
|
||||
@@ -163,8 +962,8 @@ MEMDEBUG_LIB = \
|
||||
##############################################################################
|
||||
|
||||
LIBS_68K := $(LIBC_OBJS)/libc.a $(LIBUNIX_OBJS)/libunix.a \
|
||||
$(LIBNET_OBJS)/libnet.a $(LIBDEBUG_OBJS)/libdebug.a \
|
||||
$(LIBAMIGA_OBJS)/libamiga.a $(LIBM_OBJS)/libm.a
|
||||
$(LIBNET_OBJS)/libnet.a $(LIBDEBUG_OBJS)/libdebug.a $(LIBAMIGA_OBJS)/libamiga.a \
|
||||
$(LIBM_OBJS)/libm.a
|
||||
LIBS_020 := $(LIBM881_OBJS)/libm881.a $(LIBS_68K)
|
||||
|
||||
##############################################################################
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# $Id: GNUmakefile.os4,v 1.116 2008-11-06 14:44:07 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
@@ -29,7 +29,11 @@ RANLIB := ppc-amigaos-ranlib
|
||||
COPY := cp -p
|
||||
DELETE := rm -rf
|
||||
MAKEDIR := mkdir -p
|
||||
LOG_COMMAND := 2>&1 | tee -a compiler.log
|
||||
# Enabling the LOG_COMMAND has the consequence that a rule will not
|
||||
# fail on an error because only the exit status from the tee command
|
||||
# will be considered
|
||||
#LOG_COMMAND := 2>&1 | tee -a compiler.log
|
||||
LOG_COMMAND :=
|
||||
# You may need to request a specific compiler version in order to
|
||||
# build the baserel versions of the library. At this time of
|
||||
# writing (2008-11-06) GCC 4.0.4 and below support the -mbaserel
|
||||
@@ -54,13 +58,13 @@ LOG_COMMAND := 2>&1 | tee -a compiler.log
|
||||
|
||||
WARNINGS := \
|
||||
-Wall -W -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
|
||||
-Wundef -Wbad-function-cast -Wmissing-declarations -Wunused -Wwrite-strings \
|
||||
-Wno-deprecated-declarations \
|
||||
-Wundef -Wmissing-declarations -Wunused -Wwrite-strings \
|
||||
-Wno-deprecated-declarations -Wno-unused-label \
|
||||
|
||||
# -Wconversion -Wshadow
|
||||
# -Wconversion -Wshadow -Wbad-function-cast
|
||||
|
||||
INCLUDES := -Iinclude -I. -I$(SDK_INCLUDE)
|
||||
OPTIONS := -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99 -mcrt=clib2
|
||||
OPTIONS := -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-builtin -fno-common -std=c99 -nostdlib
|
||||
OPTIMIZE := -DNDEBUG -O3
|
||||
|
||||
#DEBUG := -ggdb
|
||||
@@ -95,45 +99,32 @@ include libdebug.gmk
|
||||
include libamiga.gmk
|
||||
include libprofile.gmk
|
||||
|
||||
##############################################################################
|
||||
|
||||
# General build rules for all object files and the individual libraries
|
||||
|
||||
define generic_rule
|
||||
|
||||
LIBS += lib/$(1)crt0.o \
|
||||
lib/$(1)crtbegin.o \
|
||||
lib/$(1)crtend.o \
|
||||
lib.threadsafe/$(1)crt0.o \
|
||||
lib.threadsafe/$(1)crtbegin.o \
|
||||
lib.threadsafe/$(1)crtend.o
|
||||
|
||||
lib/$(1)%.o : AFLAGS += $(2)
|
||||
lib/$(1)%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
lib/$(1)%.o : CFLAGS += $(2)
|
||||
lib/$(1)%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib.threadsafe/$(1)%.o : AFLAGS += $(THREADSAFE) $(2)
|
||||
lib.threadsafe/$(1)%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/$(1)%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
lib.threadsafe/$(1)%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call generic_rule,,$(LARGEDATA)))
|
||||
$(eval $(call generic_rule,small-data/,$(SMALLDATA)))
|
||||
$(eval $(call generic_rule,soft-float/,$(SOFTFLOAT)))
|
||||
$(eval $(call generic_rule,baserel/,$(BASEREL)))
|
||||
|
||||
##############################################################################
|
||||
|
||||
all-targets: $(LIBS)
|
||||
all-targets: \
|
||||
lib/crt0.o \
|
||||
lib/small-data/crt0.o \
|
||||
lib/soft-float/crt0.o \
|
||||
lib/baserel/crt0.o \
|
||||
lib/crtbegin.o \
|
||||
lib/soft-float/crtbegin.o \
|
||||
lib/small-data/crtbegin.o \
|
||||
lib/baserel/crtbegin.o \
|
||||
lib/crtend.o \
|
||||
lib/soft-float/crtend.o \
|
||||
lib/small-data/crtend.o \
|
||||
lib/baserel/crtend.o \
|
||||
lib.threadsafe/crt0.o \
|
||||
lib.threadsafe/small-data/crt0.o \
|
||||
lib.threadsafe/soft-float/crt0.o \
|
||||
lib.threadsafe/baserel/crt0.o \
|
||||
lib.threadsafe/crtbegin.o \
|
||||
lib.threadsafe/soft-float/crtbegin.o \
|
||||
lib.threadsafe/small-data/crtbegin.o \
|
||||
lib.threadsafe/baserel/crtbegin.o \
|
||||
lib.threadsafe/crtend.o \
|
||||
lib.threadsafe/soft-float/crtend.o \
|
||||
lib.threadsafe/small-data/crtend.o \
|
||||
lib.threadsafe/baserel/crtend.o \
|
||||
$(LIBS)
|
||||
|
||||
##############################################################################
|
||||
|
||||
@@ -171,6 +162,105 @@ cvs-tag:
|
||||
|
||||
##############################################################################
|
||||
|
||||
# General build rules for all object files and the individual libraries
|
||||
|
||||
lib/crtbegin.o : CFLAGS += -fno-aggressive-loop-optimizations
|
||||
lib/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/%.o : AFLAGS += $(LARGEDATA)
|
||||
lib/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/small-data/%.o : AFLAGS += $(SMALLDATA)
|
||||
lib/small-data/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/small-data/crtbegin.o : CFLAGS += $(SMALLDATA) -fno-aggressive-loop-optimizations
|
||||
lib/small-data/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/small-data/%.o : CFLAGS += $(SMALLDATA)
|
||||
lib/small-data/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/soft-float/%.o : AFLAGS += $(SOFTFLOAT)
|
||||
lib/soft-float/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/soft-float/crtbegin.o : CFLAGS += $(SOFTFLOAT) -fno-aggressive-loop-optimizations
|
||||
lib/soft-float/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/soft-float/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
lib/soft-float/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/baserel/%.o : AFLAGS += $(BASEREL)
|
||||
lib/baserel/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/baserel/crtbegin.o : CFLAGS += $(BASEREL) -fno-aggressive-loop-optimizations
|
||||
lib/baserel/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/baserel/%.o : CFLAGS += $(BASEREL)
|
||||
lib/baserel/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/%.o : AFLAGS += $(LARGEDATA) $(THREADSAFE)
|
||||
lib.threadsafe/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/crtbegin.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
lib.threadsafe/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/small-data/%.o : AFLAGS += $(SMALLDATA) $(THREADSAFE)
|
||||
lib.threadsafe/small-data/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/small-data/crtbegin.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/small-data/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/small-data/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
lib.threadsafe/small-data/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/soft-float/%.o : AFLAGS += $(SOFTFLOAT) $(THREADSAFE)
|
||||
lib.threadsafe/soft-float/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/soft-float/crtbegin.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/soft-float/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/soft-float/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
lib.threadsafe/soft-float/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/baserel/%.o : AFLAGS += $(BASEREL) $(THREADSAFE)
|
||||
lib.threadsafe/baserel/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/baserel/crtbegin.o : CFLAGS += $(THREADSAFE) $(BASEREL) -fno-aggressive-loop-optimizations
|
||||
lib.threadsafe/baserel/crtbegin.o : crtbegin.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/baserel/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
lib.threadsafe/baserel/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
define COMPILE
|
||||
-$(MAKEDIR) $(@D)
|
||||
echo "Compiling $< [$(@D)]"
|
||||
@@ -184,7 +274,7 @@ $(CC) $(AFLAGS) -o $@ -c $< $(LOG_COMMAND)
|
||||
endef
|
||||
|
||||
define MAKELIB
|
||||
-$(MAKEDIR) $@
|
||||
-$(MAKEDIR) $(@D)
|
||||
$(DELETE) $@
|
||||
echo "Making $@"
|
||||
$(AR) $@ $^ $(LOG_COMMAND)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "amiga.lib 1.213"
|
||||
#define VSTRING "amiga.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: amiga.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "amiga.lib 1.215"
|
||||
#define VSTRING "amiga.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: amiga.lib 1.215 (26.6.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
215
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "c.lib 1.213"
|
||||
#define VSTRING "c.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: c.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "c.lib 1.215"
|
||||
#define VSTRING "c.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: c.lib 1.215 (26.6.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
215
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
c.lib 1.216 (xxx)
|
||||
|
||||
- Add some wchar and multbyte-string related functions to allow gcc
|
||||
building a libstdc++ library with wide char support. For now, the
|
||||
functions are mostly stub ones only. They can be implemented on
|
||||
demand.
|
||||
|
||||
|
||||
c.lib 1.215 (26.6.2017)
|
||||
|
||||
- Added -fno-aggressive-loop-optimizations option when building crtbegin.c
|
||||
to work around constructor/destructor hack with GCC 5.4.0 on AmigaOS 4.
|
||||
|
||||
- Added -fno-builtin option to fix conflicts with builtin memset()
|
||||
with GCC 5.4.0 on AmigaOS 4.
|
||||
|
||||
|
||||
c.lib 1.214 (27.4.2017)
|
||||
|
||||
- Added integer overflow test to calloc().
|
||||
|
||||
- Tiny change in getopt_long() so that the value pointed to by longindex
|
||||
is always initialized to an invalid index position (that being -1),
|
||||
instead of 0. The value of 0 can break some shell commands, most notably
|
||||
GNU wget.
|
||||
|
||||
|
||||
c.lib 1.213 (4.12.2016)
|
||||
|
||||
- Added the __decay_unused_slabs() function which brings all currently
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: crtbegin.c,v 1.13 2010-08-21 11:37:03 obarthel Exp $
|
||||
* crtbegin.c
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -48,7 +48,12 @@
|
||||
* Dummy constructor and destructor array. The linker script will put these at the
|
||||
* very beginning of section ".ctors" and ".dtors". crtend.o contains a similar entry
|
||||
* with a NULL pointer entry and is put at the end of the sections. This way, the init
|
||||
* code can find the global constructor/destructor pointers
|
||||
* code can find the global constructor/destructor pointers.
|
||||
*
|
||||
* WARNING:
|
||||
* This hack does not work correctly with GCC 5 and higher. The optimizer
|
||||
* will see a one element array and act appropriately. The current workaround
|
||||
* is to use -fno-aggressive-loop-optimizations when compiling this file.
|
||||
*/
|
||||
static void (*__CTOR_LIST__[1]) (void) __attribute__(( used, section(".ctors"), aligned(sizeof(void (*)(void))) ));
|
||||
static void (*__DTOR_LIST__[1]) (void) __attribute__(( used, section(".dtors"), aligned(sizeof(void (*)(void))) ));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "debug.lib 1.213"
|
||||
#define VSTRING "debug.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: debug.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "debug.lib 1.215"
|
||||
#define VSTRING "debug.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: debug.lib 1.215 (26.6.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
215
|
||||
|
||||
@@ -125,7 +125,7 @@ CLIB_DESTRUCTOR(dirent_exit)
|
||||
|
||||
if(__directory_list.mlh_Head != NULL)
|
||||
{
|
||||
while(NOT IsListEmpty((struct List *)&__directory_list))
|
||||
while(NOT IsMinListEmpty(&__directory_list))
|
||||
closedir((DIR *)__directory_list.mlh_Head);
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ opendir(const char * path_name)
|
||||
UnLockDosList(LDF_VOLUMES|LDF_READ);
|
||||
|
||||
/* Bail out if we cannot present anything. */
|
||||
if(IsListEmpty((struct List *)&dh->dh_VolumeList))
|
||||
if(IsMinListEmpty(&dh->dh_VolumeList))
|
||||
{
|
||||
__set_errno(ENOMEM);
|
||||
goto out;
|
||||
|
||||
@@ -93,7 +93,7 @@ readdir(DIR * directory_pointer)
|
||||
|
||||
assert( (((ULONG)name) & 3) == 0 );
|
||||
|
||||
if(dh->dh_VolumeNode == NULL && NOT IsListEmpty((struct List *)&dh->dh_VolumeList))
|
||||
if(dh->dh_VolumeNode == NULL && NOT IsMinListEmpty(&dh->dh_VolumeList))
|
||||
dh->dh_VolumeNode = (struct Node *)dh->dh_VolumeList.mlh_Head;
|
||||
|
||||
strcpy(name,"\1:"); /* BSTR for ":" */
|
||||
|
||||
@@ -296,7 +296,7 @@ static int getopt_long_internal(int argc, const char **argv, const char *optstri
|
||||
optp = strchr(optstring, c);
|
||||
|
||||
/* We never find a long option in a compound option */
|
||||
*longindex = 0;
|
||||
*longindex = -1;
|
||||
|
||||
/* Check if it's legal */
|
||||
if (c == ':' || (optp == NULL))
|
||||
|
||||
@@ -359,7 +359,7 @@ extern unsigned int (* __get_default_stack_size)(void);
|
||||
/*
|
||||
* This library falls back onto locale.library to perform string collation
|
||||
* in strcoll(), character conversion in toupper() and various other
|
||||
* functions. This may not your intention. To restrict the library to use
|
||||
* functions. This may not be your intention. To restrict the library to use
|
||||
* only the "C" language locale, declare the following variable in your
|
||||
* code and set it to FALSE, so that it overrides the default settings.
|
||||
* The variable value is checked during program startup and, if set to
|
||||
|
||||
@@ -166,6 +166,8 @@ extern int errno;
|
||||
|
||||
#define EILSEQ 85 /* Encoding error detected */
|
||||
|
||||
#define ENOTSUP 86 /* Not supported */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -59,6 +59,10 @@ extern "C" {
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
typedef void *locale_t;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
struct lconv
|
||||
{
|
||||
char * decimal_point; /* Decimal point character (non-monetary). */
|
||||
|
||||
@@ -61,7 +61,11 @@ extern "C" {
|
||||
|
||||
typedef int ptrdiff_t;
|
||||
typedef unsigned int size_t;
|
||||
|
||||
/* wchar_t is a built-in type in C++ */
|
||||
#ifndef __cplusplus
|
||||
typedef unsigned short wchar_t;
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@
|
||||
#include <stddef.h>
|
||||
#endif /* _STDDEF_H */
|
||||
|
||||
#ifndef _SYS_CLIB2_STDC_H
|
||||
#include <sys/clib2_stdc.h>
|
||||
#endif /* _SYS_CLIB2_STDC_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -447,6 +451,11 @@ extern lldiv_t lldiv(long long n,long long d);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
extern int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n);
|
||||
extern int wctomb(char *s, wchar_t wchar);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -62,6 +62,7 @@ extern int strcmp(const char *s1, const char * s2);
|
||||
extern int strncmp(const char *s1, const char *s2, size_t n);
|
||||
extern char *strcpy(char *dest, const char *src);
|
||||
extern char *strncpy(char *dest, const char *src, size_t n);
|
||||
extern size_t strnlen(const char *s, size_t maxlen);
|
||||
extern size_t strlen(const char *s);
|
||||
extern char *strchr(const char *s, int c);
|
||||
extern char *strrchr(const char *s, int c);
|
||||
|
||||
73
library/include/sys/param.h
Normal file
73
library/include/sys/param.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* $Id: $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2017 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Documentation and source code for this library, and the most recent library
|
||||
* build are available from <https://github.com/adtools/clib2>.
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _SYS_PARAM_H
|
||||
#define _SYS_PARAM_H
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* The following is not part of the ISO 'C' (1994) standard. */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef _UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif /* _UNISTD_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* _SYS_MOUNT_H */
|
||||
@@ -106,10 +106,24 @@ extern size_t strftime(char *s, size_t maxsize, const char *format,
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Timespec declaration */
|
||||
struct timespec
|
||||
{
|
||||
time_t tv_secs;
|
||||
long tv_nsec;
|
||||
};
|
||||
|
||||
#ifndef tv_sec
|
||||
#define tv_sec tv_secs
|
||||
#endif /* tv_sec */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
extern char * asctime_r(const struct tm *tm,char * buffer);
|
||||
extern char * ctime_r(const time_t *tptr,char * buffer);
|
||||
extern struct tm * gmtime_r(const time_t *t,struct tm * tm_ptr);
|
||||
extern struct tm * localtime_r(const time_t *t,struct tm * tm_ptr);
|
||||
extern void tzset(void);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef _SYS_CLIB2_STDC_H
|
||||
#include <sys/clib2_stdc.h>
|
||||
#endif /* _SYS_CLIB2_STDC_H */
|
||||
|
||||
#ifndef _STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif /* _STDDEF_H */
|
||||
@@ -59,6 +63,14 @@
|
||||
#include <time.h>
|
||||
#endif /* _TIME_H */
|
||||
|
||||
#ifndef _LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif /* _LOCALE_H */
|
||||
|
||||
#ifndef _STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -68,8 +80,6 @@ extern "C" {
|
||||
/****************************************************************************/
|
||||
|
||||
#define WEOF (-1)
|
||||
#define WCHAR_MAX 65535
|
||||
#define WCHAR_MIN 0
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -81,7 +91,6 @@ typedef long mbstate_t;
|
||||
extern wint_t btowc(int c);
|
||||
extern int wctob(wint_t c);
|
||||
extern int mbsinit(const mbstate_t *ps);
|
||||
extern size_t mbrlen(wchar_t *pwc, const char * s, size_t n, mbstate_t *ps);
|
||||
extern size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps);
|
||||
extern size_t mbsrtowcs(wchar_t *pwcs, const char **src, size_t n, mbstate_t *ps);
|
||||
extern size_t wcsrtombs(char *s, const wchar_t **src, size_t n, mbstate_t *ps);
|
||||
@@ -161,7 +170,7 @@ extern int swprintf(wchar_t *s, const wchar_t *format, ...);
|
||||
|
||||
extern int vfwprintf(FILE *stream,const wchar_t *format,va_list arg);
|
||||
extern int vwprintf(const wchar_t *format,va_list arg);
|
||||
extern int vswprintf(char *s, const wchar_t *format,va_list arg);
|
||||
extern int vswprintf(wchar_t *s, size_t maxlen, const wchar_t *format, va_list arg);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -174,16 +183,24 @@ extern size_t wcsftime(wchar_t *s, size_t maxsize, const wchar_t *format, const
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__cplusplus)
|
||||
|
||||
extern size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict ps);
|
||||
extern size_t mbrtowc(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps);
|
||||
extern int mbsinit(const mbstate_t *ps);
|
||||
extern size_t mbsnrtowcs(wchar_t *restrict dst, const char **restrict src, size_t nmc, size_t len, mbstate_t *restrict ps);
|
||||
extern size_t mbsrtowcs(wchar_t *restrict dst, const char **restrict src, size_t len, mbstate_t *restrict ps);
|
||||
|
||||
extern size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict ps);
|
||||
extern int wcscoll(const wchar_t *ws1, const wchar_t *ws2);
|
||||
extern int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t loc);
|
||||
extern size_t wcscspn(const wchar_t *s, const wchar_t *c);
|
||||
extern size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps);
|
||||
extern wchar_t * wcsrchr(const wchar_t *ws, wchar_t wc);
|
||||
extern size_t wcsrtombs(char *restrict dst, const wchar_t **restrict src, size_t len, mbstate_t *restrict ps);
|
||||
extern long long wcstoll(const wchar_t *str, wchar_t **ptr, int base);
|
||||
extern unsigned long long wcstoull(const wchar_t *str, wchar_t **ptr, int base);
|
||||
|
||||
extern size_t mbrtowc_l(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps, locale_t loc);
|
||||
extern int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t loc);
|
||||
extern size_t wcscspn(const wchar_t *ws1, const wchar_t *ws2);
|
||||
extern wchar_t * wcsrchr(const wchar_t *ws, wchar_t wc);
|
||||
|
||||
#endif /* __STDC_VERSION__ && __STDC_VERSION__ >= 199901L */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -1,44 +1,127 @@
|
||||
#
|
||||
# $Id: libamiga.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libamiga.obj.gmk
|
||||
AMIGA_LIB = $(sort $(AMIGA_LIB_COMMON) $(AMIGA_LIB_OS4))
|
||||
LIBS += \
|
||||
lib/libamiga.a \
|
||||
lib/soft-float/libamiga.a \
|
||||
lib/small-data/libamiga.a \
|
||||
lib/baserel/libamiga.a \
|
||||
lib.threadsafe/libamiga.a \
|
||||
lib.threadsafe/soft-float/libamiga.a \
|
||||
lib.threadsafe/small-data/libamiga.a \
|
||||
lib.threadsafe/baserel/libamiga.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libamiga_rule
|
||||
AMIGA_LIB = \
|
||||
amiga.lib_rev.o \
|
||||
amiga_acrypt.o \
|
||||
amiga_addtof.o \
|
||||
amiga_argarraydone.o \
|
||||
amiga_argarrayinit.o \
|
||||
amiga_argint.o \
|
||||
amiga_argstring.o \
|
||||
amiga_beginio.o \
|
||||
amiga_callhooka.o \
|
||||
amiga_coercemethod.o \
|
||||
amiga_createextio.o \
|
||||
amiga_createport.o \
|
||||
amiga_createstdio.o \
|
||||
amiga_createtask.o \
|
||||
amiga_deleteextio.o \
|
||||
amiga_deleteport.o \
|
||||
amiga_deletestdio.o \
|
||||
amiga_deletetask.o \
|
||||
amiga_domethod.o \
|
||||
amiga_dosupermethod.o \
|
||||
amiga_dotimer.o \
|
||||
amiga_fastrand.o \
|
||||
amiga_freeievents.o \
|
||||
amiga_hotkey.o \
|
||||
amiga_invertstring.o \
|
||||
amiga_newlist.o \
|
||||
amiga_rangerand.o \
|
||||
amiga_remtof.o \
|
||||
amiga_rexxvars.o \
|
||||
amiga_setsuperattrs.o \
|
||||
amiga_timedelay.o \
|
||||
amiga_waitbeam.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/$(1)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(AMIGA_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(AMIGA_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/soft-float/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/small-data/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/baserel/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/soft-float/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/small-data/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/baserel/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libamiga_rule,libamiga,$(LARGEDATA)))
|
||||
$(eval $(call libamiga_rule,soft-float/libamiga,$(SOFTFLOAT)))
|
||||
$(eval $(call libamiga_rule,small-data/libamiga,$(SMALLDATA)))
|
||||
$(eval $(call libamiga_rule,baserel/libamiga,$(BASEREL)))
|
||||
obj/libamiga/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libamiga/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libamiga/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libamiga/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libamiga/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libamiga/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libamiga/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libamiga/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libamiga.a : $(addprefix obj/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libamiga.a : $(addprefix obj/soft-float/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libamiga.a : $(addprefix obj/small-data/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libamiga.a : $(addprefix obj/baserel/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libamiga.a : $(addprefix obj.threadsafe/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libamiga.a : $(addprefix obj.threadsafe/soft-float/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libamiga.a : $(addprefix obj.threadsafe/small-data/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libamiga.a : $(addprefix obj.threadsafe/baserel/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
AMIGA_LIB_COMMON := \
|
||||
amiga.lib_rev.o \
|
||||
amiga_acrypt.o \
|
||||
amiga_addtof.o \
|
||||
amiga_argarraydone.o \
|
||||
amiga_argarrayinit.o \
|
||||
amiga_argint.o \
|
||||
amiga_argstring.o \
|
||||
amiga_beginio.o \
|
||||
amiga_callhooka.o \
|
||||
amiga_coercemethod.o \
|
||||
amiga_createextio.o \
|
||||
amiga_createport.o \
|
||||
amiga_createstdio.o \
|
||||
amiga_createtask.o \
|
||||
amiga_deleteextio.o \
|
||||
amiga_deleteport.o \
|
||||
amiga_deletestdio.o \
|
||||
amiga_deletetask.o \
|
||||
amiga_domethod.o \
|
||||
amiga_dosupermethod.o \
|
||||
amiga_dotimer.o \
|
||||
amiga_fastrand.o \
|
||||
amiga_freeievents.o \
|
||||
amiga_hotkey.o \
|
||||
amiga_invertstring.o \
|
||||
amiga_newlist.o \
|
||||
amiga_rangerand.o \
|
||||
amiga_remtof.o \
|
||||
amiga_rexxvars.o \
|
||||
amiga_setsuperattrs.o \
|
||||
amiga_timedelay.o \
|
||||
amiga_waitbeam.o
|
||||
|
||||
AMIGA_LIB_OS3 := \
|
||||
amiga_callhook.o \
|
||||
amiga_hookentry.o
|
||||
|
||||
AMIGA_LIB_OS4 :=
|
||||
531
library/libc.gmk
531
library/libc.gmk
@@ -1,44 +1,523 @@
|
||||
#
|
||||
# $Id: libc.gmk,v 1.9 2010-10-20 13:50:17 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libc.obj.gmk
|
||||
C_LIB := $(sort $(C_LIB_COMMON) $(C_LIB_OS4))
|
||||
LIBS += \
|
||||
lib/libc.a \
|
||||
lib/soft-float/libc.a \
|
||||
lib/small-data/libc.a \
|
||||
lib/baserel/libc.a \
|
||||
lib.threadsafe/libc.a \
|
||||
lib.threadsafe/soft-float/libc.a \
|
||||
lib.threadsafe/small-data/libc.a \
|
||||
lib.threadsafe/baserel/libc.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libc_rule
|
||||
C_LIB := \
|
||||
c.lib_rev.o \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
ctype_islower.o \
|
||||
ctype_isprint.o \
|
||||
ctype_ispunct.o \
|
||||
ctype_isspace.o \
|
||||
ctype_isupper.o \
|
||||
ctype_isxdigit.o \
|
||||
ctype_table.o \
|
||||
ctype_tolower.o \
|
||||
ctype_toupper.o \
|
||||
dirent_closedir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
dirent_rewinddir.o \
|
||||
errno_data.o \
|
||||
fcntl_close.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_get_default_file.o \
|
||||
fcntl_lock.o \
|
||||
fcntl_lseek.o \
|
||||
fcntl_open.o \
|
||||
fcntl_read.o \
|
||||
fcntl_write.o \
|
||||
ftw_ftw.o \
|
||||
ftw_nftw.o \
|
||||
inttypes_imaxdiv.o \
|
||||
inttypes_imaxabs.o \
|
||||
inttypes_strtoimax.o \
|
||||
inttypes_strtoumax.o \
|
||||
libgen_basename.o \
|
||||
libgen_dirname.o \
|
||||
locale_init_exit.o \
|
||||
locale_localeconv.o \
|
||||
locale_open_locale.o \
|
||||
locale_setlocale.o \
|
||||
mount_convertinfo.o \
|
||||
mount_fstatfs.o \
|
||||
mount_statfs.o \
|
||||
profile_profil.o \
|
||||
signal_checkabort.o \
|
||||
signal_data.o \
|
||||
signal_kill.o \
|
||||
signal_mask.o \
|
||||
signal_raise.o \
|
||||
signal_sigaddset.o \
|
||||
signal_sigblock.o \
|
||||
signal_sigemptyset.o \
|
||||
signal_sigmask.o \
|
||||
signal_signal.o \
|
||||
signal_sigprocmask.o \
|
||||
signal_sigsetmask.o \
|
||||
stat_chmod.o \
|
||||
stat_convertfileinfo.o \
|
||||
stat_fchmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stat_umask.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_change_fd_action.o \
|
||||
stdio_change_fd_user_data.o \
|
||||
stdio_clearerr.o \
|
||||
stdio_dropiobreadbuffer.o \
|
||||
stdio_duplicate_fd.o \
|
||||
stdio_examine_fh.o \
|
||||
stdio_fclose.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_feof.o \
|
||||
stdio_ferror.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fgetc.o \
|
||||
stdio_fgetpos.o \
|
||||
stdio_fgets.o \
|
||||
stdio_filliobreadbuffer.o \
|
||||
stdio_findvacantfdentry.o \
|
||||
stdio_findvacantiobentry.o \
|
||||
stdio_flockfile.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_flushiobwritebuffer.o \
|
||||
stdio_fopen.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fputc.o \
|
||||
stdio_fputs.o \
|
||||
stdio_fread.o \
|
||||
stdio_freopen.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_fseek.o \
|
||||
stdio_fseeko.o \
|
||||
stdio_fsetpos.o \
|
||||
stdio_ftell.o \
|
||||
stdio_ftello.o \
|
||||
stdio_ftrylockfile.o \
|
||||
stdio_funlockfile.o \
|
||||
stdio_fwrite.o \
|
||||
stdio_getc.o \
|
||||
stdio_getc_unlocked.o \
|
||||
stdio_getchar.o \
|
||||
stdio_getchar_unlocked.o \
|
||||
stdio_gets.o \
|
||||
stdio_get_fd.o \
|
||||
stdio_get_file_descriptor.o \
|
||||
stdio_growfdtable.o \
|
||||
stdio_growiobtable.o \
|
||||
stdio_grow_file.o \
|
||||
stdio_initializefd.o \
|
||||
stdio_initializeiob.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_iobhookentry.o \
|
||||
stdio_lock.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_nostdio.o \
|
||||
stdio_openiob.o \
|
||||
stdio_parent_of_fh.o \
|
||||
stdio_perror.o \
|
||||
stdio_popen.o \
|
||||
stdio_printf.o \
|
||||
stdio_putc.o \
|
||||
stdio_putc_unlocked.o \
|
||||
stdio_putchar.o \
|
||||
stdio_putchar_unlocked.o \
|
||||
stdio_puts.o \
|
||||
stdio_remove.o \
|
||||
stdio_remove_fd_alias.o \
|
||||
stdio_rename.o \
|
||||
stdio_resolve_fd_file.o \
|
||||
stdio_rewind.o \
|
||||
stdio_scanf.o \
|
||||
stdio_setbuf.o \
|
||||
stdio_setvbuf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_sscanf_hook_entry.o \
|
||||
stdio_tmpfile.o \
|
||||
stdio_tmpnam.o \
|
||||
stdio_translateioerror.o \
|
||||
stdio_ungetc.o \
|
||||
stdio_unlockfile.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vasprintf_hook_entry.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsnprintf_hook_entry.o \
|
||||
stdio_vsprintf.o \
|
||||
stdio_vsprintf_hook_entry.o \
|
||||
stdlib_abort.o \
|
||||
stdlib_abs.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_assertion_failure.o \
|
||||
stdlib_atexit.o \
|
||||
stdlib_atoi.o \
|
||||
stdlib_atol.o \
|
||||
stdlib_atoll.o \
|
||||
stdlib_bsearch.o \
|
||||
stdlib_calloc.o \
|
||||
stdlib_checkdetach.o \
|
||||
stdlib_constructor.o \
|
||||
stdlib_constructor_begin.o \
|
||||
stdlib_default_pool_size.o \
|
||||
stdlib_default_puddle_size.o \
|
||||
stdlib_destructor.o \
|
||||
stdlib_detach.o \
|
||||
stdlib_disablerequesters.o \
|
||||
stdlib_div.o \
|
||||
stdlib_divsi3.o \
|
||||
stdlib_divsi4.o \
|
||||
stdlib_dlclose.o \
|
||||
stdlib_dlerror.o \
|
||||
stdlib_dlopen.o \
|
||||
stdlib_dlsym.o \
|
||||
stdlib_dosbase.o \
|
||||
stdlib_exit.o \
|
||||
stdlib_free.o \
|
||||
stdlib_decay_unused_slabs.o \
|
||||
stdlib_free_unused_slabs.o \
|
||||
stdlib_getdefstacksize.o \
|
||||
stdlib_getenv.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_getsp.o \
|
||||
stdlib_get_errno.o \
|
||||
stdlib_get_slab_usage.o \
|
||||
stdlib_get_slab_allocations.o \
|
||||
stdlib_get_slab_stats.o \
|
||||
stdlib_isresident.o \
|
||||
stdlib_labs.o \
|
||||
stdlib_llabs.o \
|
||||
stdlib_ldiv.o \
|
||||
stdlib_lldiv.o \
|
||||
stdlib_lib_main.o \
|
||||
stdlib_lib_startup.o \
|
||||
stdlib_machine_test.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_math.o \
|
||||
stdlib_mbtowc.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_modsi3.o \
|
||||
stdlib_mulsi3.o \
|
||||
stdlib_never_free.o \
|
||||
stdlib_osliberror.o \
|
||||
stdlib_oslibversion.o \
|
||||
stdlib_priority.o \
|
||||
stdlib_process_name.o \
|
||||
stdlib_program_name.o \
|
||||
stdlib_putenv.o \
|
||||
stdlib_qsort.o \
|
||||
stdlib_rand.o \
|
||||
stdlib_rand_r.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_red_black.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_semaphore.o \
|
||||
stdlib_setenv.o \
|
||||
stdlib_setjmp.o \
|
||||
stdlib_set_errno.o \
|
||||
stdlib_set_process_window.o \
|
||||
stdlib_shared_objs.o \
|
||||
stdlib_shell_escape.o \
|
||||
stdlib_showerror.o \
|
||||
stdlib_slab.o \
|
||||
stdlib_slab_max_size.o \
|
||||
stdlib_slab_purge_threshold.o \
|
||||
stdlib_srand.o \
|
||||
stdlib_stacksize.o \
|
||||
stdlib_stack_usage.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_stdio_window_spec.o \
|
||||
stdlib_strtol.o \
|
||||
stdlib_strtoll.o \
|
||||
stdlib_strtoul.o \
|
||||
stdlib_strtoull.o \
|
||||
stdlib_swapstack.o \
|
||||
stdlib_sysbase.o \
|
||||
stdlib_system.o \
|
||||
stdlib_termination_message.o \
|
||||
stdlib_threshold.o \
|
||||
stdlib_utilitybase.o \
|
||||
stdlib_udivsi3.o \
|
||||
stdlib_udivsi4.o \
|
||||
stdlib_umodsi3.o \
|
||||
stdlib_unsetenv.o \
|
||||
strings_ffs.o \
|
||||
strings_strcasecmp.o \
|
||||
strings_strncasecmp.o \
|
||||
string_bcmp.o \
|
||||
string_bcopy.o \
|
||||
string_bzero.o \
|
||||
string_index.o \
|
||||
string_memchr.o \
|
||||
string_memcmp.o \
|
||||
string_memcpy.o \
|
||||
string_memmove.o \
|
||||
string_memset.o \
|
||||
string_rindex.o \
|
||||
string_strcat.o \
|
||||
string_strchr.o \
|
||||
string_strcmp.o \
|
||||
string_strcoll.o \
|
||||
string_strcpy.o \
|
||||
string_strcspn.o \
|
||||
string_strdup.o \
|
||||
string_strerror.o \
|
||||
string_strerror_r.o \
|
||||
string_strlcat.o \
|
||||
string_strlcpy.o \
|
||||
string_strlen.o \
|
||||
string_strncat.o \
|
||||
string_strncmp.o \
|
||||
string_strncpy.o \
|
||||
string_strnlen.o \
|
||||
string_strpbrk.o \
|
||||
string_strrchr.o \
|
||||
string_strspn.o \
|
||||
string_strstr.o \
|
||||
string_strtok.o \
|
||||
string_strtok_r.o \
|
||||
string_strxfrm.o \
|
||||
time_asctime.o \
|
||||
time_asctime_r.o \
|
||||
time_clock.o \
|
||||
time_converttime.o \
|
||||
time_convert_datestamp.o \
|
||||
time_convert_time.o \
|
||||
time_ctime.o \
|
||||
time_ctime_r.o \
|
||||
time_data.o \
|
||||
time_days_per_date.o \
|
||||
time_gettimeofday.o \
|
||||
time_gmtime.o \
|
||||
time_gmtime_r.o \
|
||||
time_localtime.o \
|
||||
time_localtime_r.o \
|
||||
time_mktime.o \
|
||||
time_numbertostring.o \
|
||||
time_strftime.o \
|
||||
time_time.o \
|
||||
time_tzset.o \
|
||||
time_weekday.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
ulimit_ulimit.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_currentpathname.o \
|
||||
unistd_dup.o \
|
||||
unistd_dup2.o \
|
||||
unistd_fchown.o \
|
||||
unistd_fdatasync.o \
|
||||
unistd_fdopen.o \
|
||||
unistd_fileno.o \
|
||||
unistd_fsync.o \
|
||||
unistd_ftruncate.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_getopt.o \
|
||||
unistd_getpid.o \
|
||||
unistd_init_exit.o \
|
||||
unistd_isatty.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_sleep.o \
|
||||
unistd_symlink.o \
|
||||
unistd_sync_fd.o \
|
||||
unistd_timer.o \
|
||||
unistd_time_delay.o \
|
||||
unistd_truncate.o \
|
||||
unistd_unlink.o \
|
||||
unistd_usleep.o \
|
||||
utime_utime.o \
|
||||
utsname_uname.o \
|
||||
wchar_btowc.o \
|
||||
wchar_fgetwc.o \
|
||||
wchar_fgetws.o \
|
||||
wchar_fputwc.o \
|
||||
wchar_fputws.o \
|
||||
wchar_fwide.o \
|
||||
wchar_fwprintf.o \
|
||||
wchar_fwscanf.o \
|
||||
wchar_getwc.o \
|
||||
wchar_getwchar.o \
|
||||
wchar_mbrlen.o \
|
||||
wchar_mbrtowc.o \
|
||||
wchar_mbsinit.o \
|
||||
wchar_mbsrtowcs.o \
|
||||
wchar_putwc.o \
|
||||
wchar_putwchar.o \
|
||||
wchar_swprintf.o \
|
||||
wchar_swscanf.o \
|
||||
wchar_ungetwc.o \
|
||||
wchar_vfwprintf.o \
|
||||
wchar_vswprintf.o \
|
||||
wchar_vwprintf.o \
|
||||
wchar_wcrtomb.o \
|
||||
wchar_wcscat.o \
|
||||
wchar_wcschr.o \
|
||||
wchar_wcscmp.o \
|
||||
wchar_wcscoll.o \
|
||||
wchar_wcscpy.o \
|
||||
wchar_wcscspn.o \
|
||||
wchar_wcsftime.o \
|
||||
wchar_wcslen.o \
|
||||
wchar_wcsncat.o \
|
||||
wchar_wcsncmp.o \
|
||||
wchar_wcsncpy.o \
|
||||
wchar_wscoll.o \
|
||||
wchar_wcspbrk.o \
|
||||
wchar_wcsrtombs.o \
|
||||
wchar_wcsspn.o \
|
||||
wchar_wcstod.o \
|
||||
wchar_wcstok.o \
|
||||
wchar_wcstol.o \
|
||||
wchar_wcstoll.o \
|
||||
wchar_wcstoul.o \
|
||||
wchar_wcstoull.o \
|
||||
wchar_wcsxfrm.o \
|
||||
wchar_wctob.o \
|
||||
wchar_wmemchr.o \
|
||||
wchar_wmemcmp.o \
|
||||
wchar_wmemcpy.o \
|
||||
wchar_wmemmove.o \
|
||||
wchar_wmemset.o \
|
||||
wchar_wprintf.o \
|
||||
wchar_wscanf.o \
|
||||
wchar_wscoll.o \
|
||||
wctype_iswalnum.o \
|
||||
wctype_iswalpha.o \
|
||||
wctype_iswblank.o \
|
||||
wctype_iswcntrl.o \
|
||||
wctype_iswctype.o \
|
||||
wctype_iswdigit.o \
|
||||
wctype_iswgraph.o \
|
||||
wctype_iswlower.o \
|
||||
wctype_iswprint.o \
|
||||
wctype_iswpunc.o \
|
||||
wctype_iswspace.o \
|
||||
wctype_iswupper.o \
|
||||
wctype_iswxdigit.o \
|
||||
wctype_towctrans.o \
|
||||
wctype_towlower.o \
|
||||
wctype_towupper.o \
|
||||
wctype_wctrans.o \
|
||||
wctype_wctype.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/$(1)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(C_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(C_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/soft-float/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/small-data/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/baserel/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/soft-float/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/small-data/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/baserel/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libc_rule,libc,$(LARGEDATA)))
|
||||
$(eval $(call libc_rule,soft-float/libc,$(SOFTFLOAT)))
|
||||
$(eval $(call libc_rule,small-data/libc,$(SMALLDATA)))
|
||||
$(eval $(call libc_rule,baserel/libc,$(BASEREL)))
|
||||
obj/libc/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libc/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libc/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libc/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libc/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libc/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libc/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libc/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libc.a : $(addprefix obj/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libc.a : $(addprefix obj/soft-float/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libc.a : $(addprefix obj/small-data/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libc.a : $(addprefix obj/baserel/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libc.a : $(addprefix obj.threadsafe/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libc.a : $(addprefix obj.threadsafe/soft-float/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libc.a : $(addprefix obj.threadsafe/small-data/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libc.a : $(addprefix obj.threadsafe/baserel/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,363 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
C_LIB_COMMON := \
|
||||
c.lib_rev.o \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
ctype_islower.o \
|
||||
ctype_isprint.o \
|
||||
ctype_ispunct.o \
|
||||
ctype_isspace.o \
|
||||
ctype_isupper.o \
|
||||
ctype_isxdigit.o \
|
||||
ctype_table.o \
|
||||
ctype_tolower.o \
|
||||
ctype_toupper.o \
|
||||
dirent_closedir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
dirent_rewinddir.o \
|
||||
errno_data.o \
|
||||
fcntl_close.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_get_default_file.o \
|
||||
fcntl_lock.o \
|
||||
fcntl_lseek.o \
|
||||
fcntl_open.o \
|
||||
fcntl_read.o \
|
||||
fcntl_write.o \
|
||||
ftw_ftw.o \
|
||||
ftw_nftw.o \
|
||||
inttypes_imaxdiv.o \
|
||||
inttypes_imaxabs.o \
|
||||
inttypes_strtoimax.o \
|
||||
inttypes_strtoumax.o \
|
||||
libgen_basename.o \
|
||||
libgen_dirname.o \
|
||||
locale_init_exit.o \
|
||||
locale_localeconv.o \
|
||||
locale_open_locale.o \
|
||||
locale_setlocale.o \
|
||||
mount_convertinfo.o \
|
||||
mount_fstatfs.o \
|
||||
mount_statfs.o \
|
||||
signal_checkabort.o \
|
||||
signal_data.o \
|
||||
signal_kill.o \
|
||||
signal_mask.o \
|
||||
signal_raise.o \
|
||||
signal_sigaddset.o \
|
||||
signal_sigblock.o \
|
||||
signal_sigemptyset.o \
|
||||
signal_sigmask.o \
|
||||
signal_signal.o \
|
||||
signal_sigprocmask.o \
|
||||
signal_sigsetmask.o \
|
||||
stat_chmod.o \
|
||||
stat_convertfileinfo.o \
|
||||
stat_fchmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stat_umask.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_change_fd_action.o \
|
||||
stdio_change_fd_user_data.o \
|
||||
stdio_clearerr.o \
|
||||
stdio_dropiobreadbuffer.o \
|
||||
stdio_duplicate_fd.o \
|
||||
stdio_examine_fh.o \
|
||||
stdio_fclose.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_feof.o \
|
||||
stdio_ferror.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fgetc.o \
|
||||
stdio_fgetpos.o \
|
||||
stdio_fgets.o \
|
||||
stdio_filliobreadbuffer.o \
|
||||
stdio_findvacantfdentry.o \
|
||||
stdio_findvacantiobentry.o \
|
||||
stdio_flockfile.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_flushiobwritebuffer.o \
|
||||
stdio_fopen.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fputc.o \
|
||||
stdio_fputs.o \
|
||||
stdio_fread.o \
|
||||
stdio_freopen.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_fseek.o \
|
||||
stdio_fseeko.o \
|
||||
stdio_fsetpos.o \
|
||||
stdio_ftell.o \
|
||||
stdio_ftello.o \
|
||||
stdio_ftrylockfile.o \
|
||||
stdio_funlockfile.o \
|
||||
stdio_fwrite.o \
|
||||
stdio_getc.o \
|
||||
stdio_getc_unlocked.o \
|
||||
stdio_getchar.o \
|
||||
stdio_getchar_unlocked.o \
|
||||
stdio_gets.o \
|
||||
stdio_get_fd.o \
|
||||
stdio_get_file_descriptor.o \
|
||||
stdio_growfdtable.o \
|
||||
stdio_growiobtable.o \
|
||||
stdio_grow_file.o \
|
||||
stdio_initializefd.o \
|
||||
stdio_initializeiob.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_iobhookentry.o \
|
||||
stdio_lock.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_nostdio.o \
|
||||
stdio_openiob.o \
|
||||
stdio_parent_of_fh.o \
|
||||
stdio_perror.o \
|
||||
stdio_popen.o \
|
||||
stdio_printf.o \
|
||||
stdio_putc.o \
|
||||
stdio_putc_unlocked.o \
|
||||
stdio_putchar.o \
|
||||
stdio_putchar_unlocked.o \
|
||||
stdio_puts.o \
|
||||
stdio_remove.o \
|
||||
stdio_remove_fd_alias.o \
|
||||
stdio_rename.o \
|
||||
stdio_resolve_fd_file.o \
|
||||
stdio_rewind.o \
|
||||
stdio_scanf.o \
|
||||
stdio_setbuf.o \
|
||||
stdio_setvbuf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_sscanf_hook_entry.o \
|
||||
stdio_tmpfile.o \
|
||||
stdio_tmpnam.o \
|
||||
stdio_translateioerror.o \
|
||||
stdio_ungetc.o \
|
||||
stdio_unlockfile.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vasprintf_hook_entry.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsnprintf_hook_entry.o \
|
||||
stdio_vsprintf.o \
|
||||
stdio_vsprintf_hook_entry.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdlib_abort.o \
|
||||
stdlib_abs.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_assertion_failure.o \
|
||||
stdlib_atexit.o \
|
||||
stdlib_atoi.o \
|
||||
stdlib_atol.o \
|
||||
stdlib_atoll.o \
|
||||
stdlib_bsearch.o \
|
||||
stdlib_calloc.o \
|
||||
stdlib_checkdetach.o \
|
||||
stdlib_constructor.o \
|
||||
stdlib_constructor_begin.o \
|
||||
stdlib_default_pool_size.o \
|
||||
stdlib_default_puddle_size.o \
|
||||
stdlib_destructor.o \
|
||||
stdlib_detach.o \
|
||||
stdlib_disablerequesters.o \
|
||||
stdlib_div.o \
|
||||
stdlib_divsi3.o \
|
||||
stdlib_divsi4.o \
|
||||
stdlib_dosbase.o \
|
||||
stdlib_exit.o \
|
||||
stdlib_free.o \
|
||||
stdlib_decay_unused_slabs.o \
|
||||
stdlib_free_unused_slabs.o \
|
||||
stdlib_getdefstacksize.o \
|
||||
stdlib_getenv.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_getsp.o \
|
||||
stdlib_get_errno.o \
|
||||
stdlib_get_slab_usage.o \
|
||||
stdlib_get_slab_allocations.o \
|
||||
stdlib_get_slab_stats.o \
|
||||
stdlib_isresident.o \
|
||||
stdlib_labs.o \
|
||||
stdlib_llabs.o \
|
||||
stdlib_ldiv.o \
|
||||
stdlib_lldiv.o \
|
||||
stdlib_lib_main.o \
|
||||
stdlib_lib_startup.o \
|
||||
stdlib_machine_test.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_math.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_modsi3.o \
|
||||
stdlib_mulsi3.o \
|
||||
stdlib_never_free.o \
|
||||
stdlib_osliberror.o \
|
||||
stdlib_oslibversion.o \
|
||||
stdlib_priority.o \
|
||||
stdlib_process_name.o \
|
||||
stdlib_program_name.o \
|
||||
stdlib_putenv.o \
|
||||
stdlib_qsort.o \
|
||||
stdlib_rand.o \
|
||||
stdlib_rand_r.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_red_black.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_semaphore.o \
|
||||
stdlib_setenv.o \
|
||||
stdlib_setjmp.o \
|
||||
stdlib_set_errno.o \
|
||||
stdlib_set_process_window.o \
|
||||
stdlib_shell_escape.o \
|
||||
stdlib_showerror.o \
|
||||
stdlib_slab.o \
|
||||
stdlib_slab_max_size.o \
|
||||
stdlib_slab_purge_threshold.o \
|
||||
stdlib_srand.o \
|
||||
stdlib_stacksize.o \
|
||||
stdlib_stack_usage.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_stdio_window_spec.o \
|
||||
stdlib_strtol.o \
|
||||
stdlib_strtoll.o \
|
||||
stdlib_strtoul.o \
|
||||
stdlib_strtoull.o \
|
||||
stdlib_swapstack.o \
|
||||
stdlib_sysbase.o \
|
||||
stdlib_system.o \
|
||||
stdlib_termination_message.o \
|
||||
stdlib_threshold.o \
|
||||
stdlib_utilitybase.o \
|
||||
stdlib_udivsi3.o \
|
||||
stdlib_udivsi4.o \
|
||||
stdlib_umodsi3.o \
|
||||
stdlib_unsetenv.o \
|
||||
strings_ffs.o \
|
||||
strings_strcasecmp.o \
|
||||
strings_strncasecmp.o \
|
||||
string_bcmp.o \
|
||||
string_bcopy.o \
|
||||
string_bzero.o \
|
||||
string_index.o \
|
||||
string_memchr.o \
|
||||
string_memcmp.o \
|
||||
string_memcpy.o \
|
||||
string_memmove.o \
|
||||
string_memset.o \
|
||||
string_rindex.o \
|
||||
string_strcat.o \
|
||||
string_strchr.o \
|
||||
string_strcmp.o \
|
||||
string_strcoll.o \
|
||||
string_strcpy.o \
|
||||
string_strcspn.o \
|
||||
string_strdup.o \
|
||||
string_strerror.o \
|
||||
string_strerror_r.o \
|
||||
string_strlcat.o \
|
||||
string_strlcpy.o \
|
||||
string_strlen.o \
|
||||
string_strncat.o \
|
||||
string_strncmp.o \
|
||||
string_strncpy.o \
|
||||
string_strpbrk.o \
|
||||
string_strrchr.o \
|
||||
string_strspn.o \
|
||||
string_strstr.o \
|
||||
string_strtok.o \
|
||||
string_strtok_r.o \
|
||||
string_strxfrm.o \
|
||||
time_asctime.o \
|
||||
time_asctime_r.o \
|
||||
time_clock.o \
|
||||
time_converttime.o \
|
||||
time_convert_datestamp.o \
|
||||
time_convert_time.o \
|
||||
time_ctime.o \
|
||||
time_ctime_r.o \
|
||||
time_data.o \
|
||||
time_days_per_date.o \
|
||||
time_gettimeofday.o \
|
||||
time_gmtime.o \
|
||||
time_gmtime_r.o \
|
||||
time_localtime.o \
|
||||
time_localtime_r.o \
|
||||
time_mktime.o \
|
||||
time_numbertostring.o \
|
||||
time_strftime.o \
|
||||
time_time.o \
|
||||
time_weekday.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
ulimit_ulimit.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_currentpathname.o \
|
||||
unistd_dup.o \
|
||||
unistd_dup2.o \
|
||||
unistd_fchown.o \
|
||||
unistd_fdatasync.o \
|
||||
unistd_fdopen.o \
|
||||
unistd_fileno.o \
|
||||
unistd_fsync.o \
|
||||
unistd_ftruncate.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_getopt.o \
|
||||
unistd_getpid.o \
|
||||
unistd_init_exit.o \
|
||||
unistd_isatty.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_sleep.o \
|
||||
unistd_symlink.o \
|
||||
unistd_sync_fd.o \
|
||||
unistd_timer.o \
|
||||
unistd_time_delay.o \
|
||||
unistd_truncate.o \
|
||||
unistd_unlink.o \
|
||||
unistd_usleep.o \
|
||||
utime_utime.o \
|
||||
utsname_uname.o
|
||||
|
||||
C_LIB_OS3 := \
|
||||
unistd_unlink_retries.o
|
||||
|
||||
C_LIB_OS4 := \
|
||||
profile_profil.o \
|
||||
stdlib_dlclose.o \
|
||||
stdlib_dlerror.o \
|
||||
stdlib_dlopen.o \
|
||||
stdlib_dlsym.o \
|
||||
stdlib_shared_objs.o
|
||||
@@ -1,43 +1,125 @@
|
||||
#
|
||||
# $Id: libdebug.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libdebug.obj.gmk
|
||||
LIBS += \
|
||||
lib/libdebug.a \
|
||||
lib/soft-float/libdebug.a \
|
||||
lib/small-data/libdebug.a \
|
||||
lib/baserel/libdebug.a \
|
||||
lib.threadsafe/libdebug.a \
|
||||
lib.threadsafe/soft-float/libdebug.a \
|
||||
lib.threadsafe/small-data/libdebug.a \
|
||||
lib.threadsafe/baserel/libdebug.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libdebug_rule
|
||||
DEBUG_LIB = \
|
||||
debug.lib_rev.o \
|
||||
debug.o \
|
||||
debug_cmpstrexec.o \
|
||||
debug_kcmpstr.o \
|
||||
debug_kdofmt.o \
|
||||
debug_kgetc.o \
|
||||
debug_kgetch1.o \
|
||||
debug_kgetch2.o \
|
||||
debug_kgetchar1.o \
|
||||
debug_kgetchar2.o \
|
||||
debug_kgetnum1.o \
|
||||
debug_kgetnum2.o \
|
||||
debug_kmaygetch.o \
|
||||
debug_kmaygetchar.o \
|
||||
debug_kprintf1.o \
|
||||
debug_kprintf2.o \
|
||||
debug_kputc.o \
|
||||
debug_kputch1.o \
|
||||
debug_kputch2.o \
|
||||
debug_kputchar1.o \
|
||||
debug_kputchar2.o \
|
||||
debug_kputfmt.o \
|
||||
debug_kputs1.o \
|
||||
debug_kputs2.o \
|
||||
debug_kputstr1.o \
|
||||
debug_kputstr2.o \
|
||||
debug_kvprintf1.o \
|
||||
debug_kvprintf2.o \
|
||||
debug_level.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/$(1)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(DEBUG_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(DEBUG_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/soft-float/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/small-data/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/baserel/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/soft-float/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/small-data/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/baserel/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libdebug_rule,libdebug,$(LARGEDATA)))
|
||||
$(eval $(call libdebug_rule,soft-float/libdebug,$(SOFTFLOAT)))
|
||||
$(eval $(call libdebug_rule,small-data/libdebug,$(SMALLDATA)))
|
||||
$(eval $(call libdebug_rule,baserel/libdebug,$(BASEREL)))
|
||||
|
||||
obj/libdebug/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libdebug/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libdebug/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libdebug/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libdebug/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libdebug/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libdebug/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libdebug/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libdebug.a : $(addprefix obj/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libdebug.a : $(addprefix obj/soft-float/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libdebug.a : $(addprefix obj/small-data/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libdebug.a : $(addprefix obj/baserel/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libdebug.a : $(addprefix obj.threadsafe/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libdebug.a : $(addprefix obj.threadsafe/soft-float/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libdebug.a : $(addprefix obj.threadsafe/small-data/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libdebug.a : $(addprefix obj.threadsafe/baserel/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
DEBUG_LIB := \
|
||||
debug.lib_rev.o \
|
||||
debug.o \
|
||||
debug_cmpstrexec.o \
|
||||
debug_kcmpstr.o \
|
||||
debug_kdofmt.o \
|
||||
debug_kgetc.o \
|
||||
debug_kgetch1.o \
|
||||
debug_kgetch2.o \
|
||||
debug_kgetchar1.o \
|
||||
debug_kgetchar2.o \
|
||||
debug_kgetnum1.o \
|
||||
debug_kgetnum2.o \
|
||||
debug_kmaygetch.o \
|
||||
debug_kmaygetchar.o \
|
||||
debug_kprintf1.o \
|
||||
debug_kprintf2.o \
|
||||
debug_kputc.o \
|
||||
debug_kputch1.o \
|
||||
debug_kputch2.o \
|
||||
debug_kputchar1.o \
|
||||
debug_kputchar2.o \
|
||||
debug_kputfmt.o \
|
||||
debug_kputs1.o \
|
||||
debug_kputs2.o \
|
||||
debug_kputstr1.o \
|
||||
debug_kputstr2.o \
|
||||
debug_kvprintf1.o \
|
||||
debug_kvprintf2.o \
|
||||
debug_level.o
|
||||
277
library/libm.gmk
277
library/libm.gmk
@@ -1,48 +1,265 @@
|
||||
#
|
||||
# $Id: libm.gmk,v 1.3 2007-01-06 10:09:48 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libm.obj.gmk
|
||||
MATH_LIB := $(sort $(MATH_LIB_COMMON) $(MATH_LIB_OS4))
|
||||
LIBS += \
|
||||
lib/libm.a \
|
||||
lib/soft-float/libm.a \
|
||||
lib/small-data/libm.a \
|
||||
lib/baserel/libm.a \
|
||||
lib.threadsafe/libm.a \
|
||||
lib.threadsafe/soft-float/libm.a \
|
||||
lib.threadsafe/small-data/libm.a \
|
||||
lib.threadsafe/baserel/libm.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libm_rule
|
||||
MATH_LIB := \
|
||||
complex_carg.o \
|
||||
complex_cargf.o \
|
||||
complex_cargl.o \
|
||||
complex_cimag.o \
|
||||
complex_cimagf.o \
|
||||
complex_cimagl.o \
|
||||
complex_conj.o \
|
||||
complex_conjf.o \
|
||||
complex_conjl.o \
|
||||
complex_creal.o \
|
||||
complex_crealf.o \
|
||||
complex_creall.o \
|
||||
fenv_feclearexcept.o \
|
||||
fenv_fegetenv.o \
|
||||
fenv_fegetexceptflag.o \
|
||||
fenv_fegetround.o \
|
||||
fenv_feholdexcept.o \
|
||||
fenv_feraiseexcept.o \
|
||||
fenv_fesetenv.o \
|
||||
fenv_fesetexceptflag.o \
|
||||
fenv_fetestexcept.o \
|
||||
fenv_fetestround.o \
|
||||
fenv_feupdateenv.o \
|
||||
math_acos.o \
|
||||
math_acosf.o \
|
||||
math_acosh.o \
|
||||
math_acoshf.o \
|
||||
math_asin.o \
|
||||
math_asinf.o \
|
||||
math_asinh.o \
|
||||
math_asinhf.o \
|
||||
math_atan.o \
|
||||
math_atan2.o \
|
||||
math_atan2f.o \
|
||||
math_atanf.o \
|
||||
math_atanh.o \
|
||||
math_atanhf.o \
|
||||
math_cbrt.o \
|
||||
math_cbrtf.o \
|
||||
math_ceil.o \
|
||||
math_ceilf.o \
|
||||
math_copysign.o \
|
||||
math_copysignf.o \
|
||||
math_cos.o \
|
||||
math_cosf.o \
|
||||
math_cosh.o \
|
||||
math_coshf.o \
|
||||
math_erf.o \
|
||||
math_erfc.o \
|
||||
math_erfcf.o \
|
||||
math_erff.o \
|
||||
math_exp.o \
|
||||
math_exp2.o \
|
||||
math_exp2f.o \
|
||||
math_expf.o \
|
||||
math_expm1.o \
|
||||
math_expm1f.o \
|
||||
math_fabs.o \
|
||||
math_fabsf.o \
|
||||
math_fdim.o \
|
||||
math_fdimf.o \
|
||||
math_floor.o \
|
||||
math_floorf.o \
|
||||
math_fma.o \
|
||||
math_fmaf.o \
|
||||
math_fmax.o \
|
||||
math_fmaxf.o \
|
||||
math_fmin.o \
|
||||
math_fminf.o \
|
||||
math_fmod.o \
|
||||
math_fmodf.o \
|
||||
math_fpclassify.o \
|
||||
math_frexp.o \
|
||||
math_frexpf.o \
|
||||
math_huge_val.o \
|
||||
math_huge_valf.o \
|
||||
math_hypot.o \
|
||||
math_hypotf.o \
|
||||
math_ilogb.o \
|
||||
math_ilogbf.o \
|
||||
math_inf.o \
|
||||
math_inff.o \
|
||||
math_init_exit.o \
|
||||
math_isfinite.o \
|
||||
math_isunordered.o \
|
||||
math_kernel_cos.o \
|
||||
math_kernel_cosf.o \
|
||||
math_kernel_expm1.o \
|
||||
math_kernel_rem_pio2.o \
|
||||
math_kernel_sin.o \
|
||||
math_kernel_sinf.o \
|
||||
math_kernel_tan.o \
|
||||
math_kernel_tanf.o \
|
||||
math_ldexp.o \
|
||||
math_ldexpf.o \
|
||||
math_lgamma.o \
|
||||
math_lgammaf.o \
|
||||
math_llrint.o \
|
||||
math_log.o \
|
||||
math_log10.o \
|
||||
math_log10f.o \
|
||||
math_log1p.o \
|
||||
math_log1pf.o \
|
||||
math_log2.o \
|
||||
math_log2f.o \
|
||||
math_logb.o \
|
||||
math_logbf.o \
|
||||
math_logf.o \
|
||||
math_lrint.o \
|
||||
math_lrintf.o \
|
||||
math_lround.o \
|
||||
math_lroundf.o \
|
||||
math_modf.o \
|
||||
math_modff.o \
|
||||
math_nan.o \
|
||||
math_nanf.o \
|
||||
math_nearbyint.o \
|
||||
math_nearbyintf.o \
|
||||
math_nextafter.o \
|
||||
math_nextafterf.o \
|
||||
math_pow.o \
|
||||
math_powf.o \
|
||||
math_remainder.o \
|
||||
math_remainderf.o \
|
||||
math_remquo.o \
|
||||
math_remquof.o \
|
||||
math_rem_pio2f.o \
|
||||
math_rint.o \
|
||||
math_rintf.o \
|
||||
math_round.o \
|
||||
math_roundf.o \
|
||||
math_scalbn.o \
|
||||
math_scalbnf.o \
|
||||
math_signbit.o \
|
||||
math_sin.o \
|
||||
math_sinf.o \
|
||||
math_sinh.o \
|
||||
math_sinhf.o \
|
||||
math_sqrt.o \
|
||||
math_sqrtf.o \
|
||||
math_tan.o \
|
||||
math_tanf.o \
|
||||
math_tanh.o \
|
||||
math_tanhf.o \
|
||||
math_tgamma.o \
|
||||
math_tgammaf.o \
|
||||
math_trunc.o \
|
||||
math_truncf.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_printf.o \
|
||||
stdio_scanf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsprintf.o \
|
||||
stdlib_atof.o \
|
||||
stdlib_strtod.o \
|
||||
stdlib_strtof.o \
|
||||
time_difftime.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/$(1)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(MATH_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(MATH_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/soft-float/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/small-data/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/baserel/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/soft-float/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/small-data/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/baserel/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libm_rule,libm, \
|
||||
$(LARGEDATA) -DPPC_FLOATING_POINT_SUPPORT))
|
||||
$(eval $(call libm_rule,soft-float/libm, \
|
||||
$(SOFTFLOAT)))
|
||||
$(eval $(call libm_rule,small-data/libm, \
|
||||
$(SMALLDATA) -DPPC_FLOATING_POINT_SUPPORT))
|
||||
$(eval $(call libm_rule,baserel/libm, \
|
||||
$(BASEREL) -DPPC_FLOATING_POINT_SUPPORT))
|
||||
obj/libm/%.o : CFLAGS += $(LARGEDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libm/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libm/%.o : CFLAGS += $(SMALLDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj/small-data/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libm/%.o : CFLAGS += $(BASEREL) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj/baserel/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libm/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj.threadsafe/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libm/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libm/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj.threadsafe/small-data/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libm/%.o : CFLAGS += $(THREADSAFE) $(BASEREL) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj.threadsafe/baserel/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libm.a : $(addprefix obj/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libm.a : $(addprefix obj/soft-float/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libm.a : $(addprefix obj/small-data/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libm.a : $(addprefix obj/baserel/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libm.a : $(addprefix obj.threadsafe/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libm.a : $(addprefix obj.threadsafe/soft-float/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libm.a : $(addprefix obj.threadsafe/small-data/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libm.a : $(addprefix obj.threadsafe/baserel/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
MATH_LIB_COMMON := \
|
||||
complex_carg.o \
|
||||
complex_cargf.o \
|
||||
complex_cargl.o \
|
||||
complex_cimag.o \
|
||||
complex_cimagf.o \
|
||||
complex_cimagl.o \
|
||||
complex_conj.o \
|
||||
complex_conjf.o \
|
||||
complex_conjl.o \
|
||||
complex_creal.o \
|
||||
complex_crealf.o \
|
||||
complex_creall.o \
|
||||
fenv_feclearexcept.o \
|
||||
fenv_fegetenv.o \
|
||||
fenv_fegetexceptflag.o \
|
||||
fenv_fegetround.o \
|
||||
fenv_feholdexcept.o \
|
||||
fenv_feraiseexcept.o \
|
||||
fenv_fesetenv.o \
|
||||
fenv_fesetexceptflag.o \
|
||||
fenv_fetestexcept.o \
|
||||
fenv_fetestround.o \
|
||||
fenv_feupdateenv.o \
|
||||
math_acos.o \
|
||||
math_acosf.o \
|
||||
math_acosh.o \
|
||||
math_acoshf.o \
|
||||
math_asin.o \
|
||||
math_asinf.o \
|
||||
math_asinh.o \
|
||||
math_asinhf.o \
|
||||
math_atan.o \
|
||||
math_atan2.o \
|
||||
math_atan2f.o \
|
||||
math_atanf.o \
|
||||
math_atanh.o \
|
||||
math_atanhf.o \
|
||||
math_cbrt.o \
|
||||
math_cbrtf.o \
|
||||
math_ceil.o \
|
||||
math_ceilf.o \
|
||||
math_copysign.o \
|
||||
math_copysignf.o \
|
||||
math_cos.o \
|
||||
math_cosf.o \
|
||||
math_cosh.o \
|
||||
math_coshf.o \
|
||||
math_erf.o \
|
||||
math_erfc.o \
|
||||
math_erfcf.o \
|
||||
math_erff.o \
|
||||
math_exp.o \
|
||||
math_exp2.o \
|
||||
math_exp2f.o \
|
||||
math_expf.o \
|
||||
math_expm1.o \
|
||||
math_expm1f.o \
|
||||
math_fabs.o \
|
||||
math_fabsf.o \
|
||||
math_fdim.o \
|
||||
math_fdimf.o \
|
||||
math_floor.o \
|
||||
math_floorf.o \
|
||||
math_fma.o \
|
||||
math_fmaf.o \
|
||||
math_fmax.o \
|
||||
math_fmaxf.o \
|
||||
math_fmin.o \
|
||||
math_fminf.o \
|
||||
math_fmod.o \
|
||||
math_fmodf.o \
|
||||
math_fpclassify.o \
|
||||
math_frexp.o \
|
||||
math_frexpf.o \
|
||||
math_huge_val.o \
|
||||
math_huge_valf.o \
|
||||
math_hypot.o \
|
||||
math_hypotf.o \
|
||||
math_ilogb.o \
|
||||
math_ilogbf.o \
|
||||
math_inf.o \
|
||||
math_inff.o \
|
||||
math_init_exit.o \
|
||||
math_isfinite.o \
|
||||
math_isunordered.o \
|
||||
math_kernel_cosf.o \
|
||||
math_kernel_sinf.o \
|
||||
math_kernel_tanf.o \
|
||||
math_ldexp.o \
|
||||
math_ldexpf.o \
|
||||
math_lgamma.o \
|
||||
math_lgammaf.o \
|
||||
math_llrint.o \
|
||||
math_log.o \
|
||||
math_log10.o \
|
||||
math_log10f.o \
|
||||
math_log1p.o \
|
||||
math_log1pf.o \
|
||||
math_log2.o \
|
||||
math_log2f.o \
|
||||
math_logb.o \
|
||||
math_logbf.o \
|
||||
math_logf.o \
|
||||
math_lrint.o \
|
||||
math_lrintf.o \
|
||||
math_lround.o \
|
||||
math_lroundf.o \
|
||||
math_modf.o \
|
||||
math_modff.o \
|
||||
math_nan.o \
|
||||
math_nanf.o \
|
||||
math_nearbyint.o \
|
||||
math_nearbyintf.o \
|
||||
math_nextafter.o \
|
||||
math_nextafterf.o \
|
||||
math_pow.o \
|
||||
math_powf.o \
|
||||
math_remainder.o \
|
||||
math_remainderf.o \
|
||||
math_remquo.o \
|
||||
math_remquof.o \
|
||||
math_rem_pio2f.o \
|
||||
math_rint.o \
|
||||
math_rintf.o \
|
||||
math_round.o \
|
||||
math_roundf.o \
|
||||
math_scalbn.o \
|
||||
math_scalbnf.o \
|
||||
math_signbit.o \
|
||||
math_sin.o \
|
||||
math_sinf.o \
|
||||
math_sinh.o \
|
||||
math_sinhf.o \
|
||||
math_sqrt.o \
|
||||
math_sqrtf.o \
|
||||
math_tan.o \
|
||||
math_tanf.o \
|
||||
math_tanh.o \
|
||||
math_tanhf.o \
|
||||
math_tgamma.o \
|
||||
math_tgammaf.o \
|
||||
math_trunc.o \
|
||||
math_truncf.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_printf.o \
|
||||
stdio_scanf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsprintf.o \
|
||||
stdlib_atof.o \
|
||||
stdlib_strtod.o \
|
||||
stdlib_strtof.o \
|
||||
time_difftime.o
|
||||
|
||||
MATH_LIB_881 = \
|
||||
m881.lib_rev.o \
|
||||
$(MATH_LIB_COMMON)
|
||||
|
||||
MATH_LIB_IEEE = \
|
||||
m.lib_rev.o \
|
||||
$(MATH_LIB_COMMON) \
|
||||
math_adddf3.o \
|
||||
math_addsf3.o \
|
||||
math_divdf3.o \
|
||||
math_divsf3.o \
|
||||
math_eqdf2.o \
|
||||
math_eqsf2.o \
|
||||
math_extendsfdf2.o \
|
||||
math_fixdfsi.o \
|
||||
math_fixsfsi.o \
|
||||
math_fixunsdfsi.o \
|
||||
math_fixunssfsi.o \
|
||||
math_floatsidf.o \
|
||||
math_floatsisf.o \
|
||||
math_gedf2.o \
|
||||
math_gesf2.o \
|
||||
math_gtdf2.o \
|
||||
math_gtsf2.o \
|
||||
math_ledf2.o \
|
||||
math_lesf2.o \
|
||||
math_ltdf2.o \
|
||||
math_ltsf2.o \
|
||||
math_muldf3.o \
|
||||
math_mulsf3.o \
|
||||
math_nedf2.o \
|
||||
math_negdf2.o \
|
||||
math_negsf2.o \
|
||||
math_nesf2.o \
|
||||
math_subdf3.o \
|
||||
math_subsf3.o \
|
||||
math_truncdfsf2.o
|
||||
|
||||
MATH_LIB_OS4 := \
|
||||
math_kernel_cos.o \
|
||||
math_kernel_expm1.o \
|
||||
math_kernel_rem_pio2.o \
|
||||
math_kernel_sin.o \
|
||||
math_kernel_tan.o
|
||||
@@ -1,47 +1,174 @@
|
||||
#
|
||||
# $Id: libnet.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libnet.obj.gmk
|
||||
LIBS += \
|
||||
lib/libnet.a \
|
||||
lib/soft-float/libnet.a \
|
||||
lib/small-data/libnet.a \
|
||||
lib/baserel/libnet.a \
|
||||
lib.threadsafe/libnet.a \
|
||||
lib.threadsafe/soft-float/libnet.a \
|
||||
lib.threadsafe/small-data/libnet.a \
|
||||
lib.threadsafe/baserel/libnet.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libnet_rule
|
||||
NET_LIB := \
|
||||
net.lib_rev.o \
|
||||
socket_accept.o \
|
||||
socket_bind.o \
|
||||
socket_check_daemon.o \
|
||||
socket_connect.o \
|
||||
socket_gethostbyaddr.o \
|
||||
socket_gethostbyname.o \
|
||||
socket_gethostid.o \
|
||||
socket_gethostname.o \
|
||||
socket_getnetbyaddr.o \
|
||||
socket_getnetbyname.o \
|
||||
socket_getpeername.o \
|
||||
socket_getprotobyname.o \
|
||||
socket_getprotobynumber.o \
|
||||
socket_getservbyname.o \
|
||||
socket_getservbyport.o \
|
||||
socket_getsockname.o \
|
||||
socket_getsockopt.o \
|
||||
socket_get_descriptor.o \
|
||||
socket_inet_addr.o \
|
||||
socket_inet_aton.o \
|
||||
socket_inet_lnaof.o \
|
||||
socket_inet_makeaddr.o \
|
||||
socket_inet_netof.o \
|
||||
socket_inet_network.o \
|
||||
socket_inet_ntoa.o \
|
||||
socket_init_exit.o \
|
||||
socket_ioctl.o \
|
||||
socket_isdaemon.o \
|
||||
socket_listen.o \
|
||||
socket_obtain_daemon.o \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
socket_setsockopt.o \
|
||||
socket_shutdown.o \
|
||||
socket_socket.o \
|
||||
socket_hook_entry.o \
|
||||
socket_hstrerror.o \
|
||||
socket_get_h_errno.o \
|
||||
socket_set_h_errno.o \
|
||||
systeminfo_sysinfo.o \
|
||||
stat_umask.o \
|
||||
usergroup_crypt.o \
|
||||
usergroup_data.o \
|
||||
usergroup_endgrent.o \
|
||||
usergroup_endpwent.o \
|
||||
usergroup_getegid.o \
|
||||
usergroup_geteuid.o \
|
||||
usergroup_getgid.o \
|
||||
usergroup_getgrent.o \
|
||||
usergroup_getgrgid.o \
|
||||
usergroup_getgrnam.o \
|
||||
usergroup_getgroups.o \
|
||||
usergroup_getpass.o \
|
||||
usergroup_getpwent.o \
|
||||
usergroup_getpwnam.o \
|
||||
usergroup_getpwuid.o \
|
||||
usergroup_getuid.o \
|
||||
usergroup_initgroups.o \
|
||||
usergroup_init_exit.o \
|
||||
usergroup_rootmode.o \
|
||||
usergroup_setegid.o \
|
||||
usergroup_seteuid.o \
|
||||
usergroup_setgid.o \
|
||||
usergroup_setgrent.o \
|
||||
usergroup_setgroups.o \
|
||||
usergroup_setpwent.o \
|
||||
usergroup_setregid.o \
|
||||
usergroup_setreuid.o \
|
||||
usergroup_setsid.o \
|
||||
usergroup_setuid.o \
|
||||
utsname_uname.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/$(1)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(NET_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(NET_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/soft-float/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/small-data/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/baserel/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/soft-float/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/small-data/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/baserel/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libnet_rule,libnet, \
|
||||
$(LARGEDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
$(eval $(call libnet_rule,soft-float/libnet, \
|
||||
$(SOFTFLOAT) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
$(eval $(call libnet_rule,small-data/libnet, \
|
||||
$(SMALLDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
$(eval $(call libnet_rule,baserel/libnet, \
|
||||
$(BASEREL) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
obj/libnet/%.o : CFLAGS += $(LARGEDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libnet/%.o : CFLAGS += $(SOFTFLOAT) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/soft-float/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libnet/%.o : CFLAGS += $(SMALLDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/small-data/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libnet/%.o : CFLAGS += $(BASEREL) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/baserel/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libnet/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libnet/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/soft-float/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libnet/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/small-data/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libnet/%.o : CFLAGS += $(THREADSAFE) $(BASEREL) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/baserel/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libnet.a : $(addprefix obj/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libnet.a : $(addprefix obj/soft-float/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libnet.a : $(addprefix obj/small-data/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libnet.a : $(addprefix obj/baserel/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libnet.a : $(addprefix obj.threadsafe/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libnet.a : $(addprefix obj.threadsafe/soft-float/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libnet.a : $(addprefix obj.threadsafe/small-data/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libnet.a : $(addprefix obj.threadsafe/baserel/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
NET_LIB := \
|
||||
net.lib_rev.o \
|
||||
socket_accept.o \
|
||||
socket_bind.o \
|
||||
socket_check_daemon.o \
|
||||
socket_connect.o \
|
||||
socket_gethostbyaddr.o \
|
||||
socket_gethostbyname.o \
|
||||
socket_gethostid.o \
|
||||
socket_gethostname.o \
|
||||
socket_getnetbyaddr.o \
|
||||
socket_getnetbyname.o \
|
||||
socket_getpeername.o \
|
||||
socket_getprotobyname.o \
|
||||
socket_getprotobynumber.o \
|
||||
socket_getservbyname.o \
|
||||
socket_getservbyport.o \
|
||||
socket_getsockname.o \
|
||||
socket_getsockopt.o \
|
||||
socket_get_descriptor.o \
|
||||
socket_inet_addr.o \
|
||||
socket_inet_aton.o \
|
||||
socket_inet_lnaof.o \
|
||||
socket_inet_makeaddr.o \
|
||||
socket_inet_netof.o \
|
||||
socket_inet_network.o \
|
||||
socket_inet_ntoa.o \
|
||||
socket_init_exit.o \
|
||||
socket_ioctl.o \
|
||||
socket_isdaemon.o \
|
||||
socket_listen.o \
|
||||
socket_obtain_daemon.o \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
socket_setsockopt.o \
|
||||
socket_shutdown.o \
|
||||
socket_socket.o \
|
||||
socket_hook_entry.o \
|
||||
socket_hstrerror.o \
|
||||
socket_get_h_errno.o \
|
||||
socket_set_h_errno.o \
|
||||
systeminfo_sysinfo.o \
|
||||
stat_umask.o \
|
||||
usergroup_crypt.o \
|
||||
usergroup_data.o \
|
||||
usergroup_endgrent.o \
|
||||
usergroup_endpwent.o \
|
||||
usergroup_getegid.o \
|
||||
usergroup_geteuid.o \
|
||||
usergroup_getgid.o \
|
||||
usergroup_getgrent.o \
|
||||
usergroup_getgrgid.o \
|
||||
usergroup_getgrnam.o \
|
||||
usergroup_getgroups.o \
|
||||
usergroup_getpass.o \
|
||||
usergroup_getpwent.o \
|
||||
usergroup_getpwnam.o \
|
||||
usergroup_getpwuid.o \
|
||||
usergroup_getuid.o \
|
||||
usergroup_initgroups.o \
|
||||
usergroup_init_exit.o \
|
||||
usergroup_rootmode.o \
|
||||
usergroup_setegid.o \
|
||||
usergroup_seteuid.o \
|
||||
usergroup_setgid.o \
|
||||
usergroup_setgrent.o \
|
||||
usergroup_setgroups.o \
|
||||
usergroup_setpwent.o \
|
||||
usergroup_setregid.o \
|
||||
usergroup_setreuid.o \
|
||||
usergroup_setsid.o \
|
||||
usergroup_setuid.o \
|
||||
utsname_uname.o
|
||||
@@ -1,51 +1,132 @@
|
||||
#
|
||||
# $Id: libprofile.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libprofile.obj.gmk
|
||||
LIBS += \
|
||||
lib/libprofile.a \
|
||||
lib/soft-float/libprofile.a \
|
||||
lib/small-data/libprofile.a \
|
||||
lib/baserel/libprofile.a \
|
||||
lib.threadsafe/libprofile.a \
|
||||
lib.threadsafe/soft-float/libprofile.a \
|
||||
lib.threadsafe/small-data/libprofile.a \
|
||||
lib.threadsafe/baserel/libprofile.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libprofile_rule
|
||||
PROFILE_LIB = \
|
||||
profile__mcount.o \
|
||||
profile_gmon.o \
|
||||
profile_mcount.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/$(1)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj/$(1)/%.o : AFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : AFLAGS += $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(PROFILE_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(PROFILE_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/soft-float/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/small-data/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/baserel/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/soft-float/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/small-data/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/baserel/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libprofile_rule,libprofile,$(LARGEDATA)))
|
||||
$(eval $(call libprofile_rule,soft-float/libprofile,$(SOFTFLOAT)))
|
||||
$(eval $(call libprofile_rule,small-data/libprofile,$(SMALLDATA)))
|
||||
$(eval $(call libprofile_rule,baserel/libprofile,$(BASEREL)))
|
||||
obj/libprofile/%.o : AFLAGS += $(LARGEDATA)
|
||||
obj/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj/soft-float/libprofile/%.o : AFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj/small-data/libprofile/%.o : AFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj/baserel/libprofile/%.o : AFLAGS += $(BASEREL)
|
||||
obj/baserel/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/libprofile/%.o : AFLAGS += $(LARGEDATA)
|
||||
obj.threadsafe/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/soft-float/libprofile/%.o : AFLAGS += $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/small-data/libprofile/%.o : AFLAGS += $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/baserel/libprofile/%.o : AFLAGS += $(BASEREL)
|
||||
obj.threadsafe/baserel/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libprofile/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libprofile/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libprofile/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libprofile/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libprofile/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libprofile/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libprofile/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libprofile/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libprofile.a : $(addprefix obj/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libprofile.a : $(addprefix obj/soft-float/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libprofile.a : $(addprefix obj/small-data/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libprofile.a : $(addprefix obj/baserel/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libprofile.a : $(addprefix obj.threadsafe/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libprofile.a : $(addprefix obj.threadsafe/soft-float/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libprofile.a : $(addprefix obj.threadsafe/small-data/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libprofile.a : $(addprefix obj.threadsafe/baserel/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
PROFILE_LIB = \
|
||||
profile__mcount.o \
|
||||
profile_gmon.o \
|
||||
profile_mcount.o
|
||||
@@ -1,48 +1,203 @@
|
||||
#
|
||||
# $Id: libunix.gmk,v 1.4 2010-08-21 10:59:34 obarthel Exp $
|
||||
#
|
||||
# vim:ts=8 ft=make:
|
||||
# :ts=8
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
include libunix.obj.gmk
|
||||
UNIX_LIB := $(sort $(UNIX_LIB_COMMON) $(UNIX_LIB_OS4))
|
||||
LIBS += \
|
||||
lib/libunix.a \
|
||||
lib/soft-float/libunix.a \
|
||||
lib/small-data/libunix.a \
|
||||
lib/baserel/libunix.a \
|
||||
lib.threadsafe/libunix.a \
|
||||
lib.threadsafe/soft-float/libunix.a \
|
||||
lib.threadsafe/small-data/libunix.a \
|
||||
lib.threadsafe/baserel/libunix.a
|
||||
|
||||
##############################################################################
|
||||
|
||||
define libunix_rule
|
||||
UNIX_LIB := \
|
||||
unix.lib_rev.o \
|
||||
dirent_closedir.o \
|
||||
dirent_rewinddir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_open.o \
|
||||
fcntl_get_default_file.o \
|
||||
getopt_getopt_long.o \
|
||||
mount_convertinfo.o \
|
||||
mount_statfs.o \
|
||||
resource_getrlimit.o \
|
||||
resource_setrlimit.o \
|
||||
stat_chmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stdio_ctermid.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fopen.o \
|
||||
stdio_file_init.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_openiob.o \
|
||||
stdio_popen.o \
|
||||
stdio_record_locking.o \
|
||||
stdio_remove.o \
|
||||
stdio_rename.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_dlopen.o \
|
||||
stdlib_expand_wildcard.o \
|
||||
stdlib_expand_wildcard_check.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_system.o \
|
||||
systeminfo_sysinfo.o \
|
||||
termios_cfgetispeed.o \
|
||||
termios_cfgetospeed.o \
|
||||
termios_cfmakeraw.o \
|
||||
termios_cfsetispeed.o \
|
||||
termios_cfsetospeed.o \
|
||||
termios_console_fdhookentry.o \
|
||||
termios_openserial.o \
|
||||
termios_tcdrain.o \
|
||||
termios_tcflow.o \
|
||||
termios_tcflush.o \
|
||||
termios_tcgetattr.o \
|
||||
termios_tcsendbreak.o \
|
||||
termios_tcsetattr.o \
|
||||
timeb_ftime.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_common_pathconf.o \
|
||||
unistd_def_path.o \
|
||||
unistd_def_path_delimiter.o \
|
||||
unistd_environ.o \
|
||||
unistd_execl.o \
|
||||
unistd_execle.o \
|
||||
unistd_execlp.o \
|
||||
unistd_execv.o \
|
||||
unistd_execve.o \
|
||||
unistd_execve_env_exit.o \
|
||||
unistd_execve_env_init.o \
|
||||
unistd_execve_exit.o \
|
||||
unistd_execvp.o \
|
||||
unistd_fpathconf.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_pathconf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_restorepathname.o \
|
||||
unistd_setcurrentpath.o \
|
||||
unistd_strip_double_slash.o \
|
||||
unistd_symlink.o \
|
||||
unistd_translatea2u.o \
|
||||
unistd_translaterel.o \
|
||||
unistd_translateu2a.o \
|
||||
unistd_truncate.o \
|
||||
unistd_ttyname.o \
|
||||
unistd_ttyname_r.o \
|
||||
unistd_unix_path_semantics.o \
|
||||
unistd_unlink.o \
|
||||
unistd_unlink_retries.o \
|
||||
unistd_wildcard_expand.o \
|
||||
utime_utime.o
|
||||
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
##############################################################################
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h
|
||||
obj.threadsafe/$(1)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h
|
||||
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(UNIX_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(UNIX_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
obj/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/soft-float/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/small-data/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/baserel/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/soft-float/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/small-data/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/baserel/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call libunix_rule,libunix, \
|
||||
$(LARGEDATA) -DUNIX_PATH_SEMANTICS))
|
||||
$(eval $(call libunix_rule,soft-float/libunix, \
|
||||
$(SOFTFLOAT) -DUNIX_PATH_SEMANTICS))
|
||||
$(eval $(call libunix_rule,small-data/libunix, \
|
||||
$(SMALLDATA) -DUNIX_PATH_SEMANTICS))
|
||||
$(eval $(call libunix_rule,baserel/libunix, \
|
||||
$(BASEREL) -DUNIX_PATH_SEMANTICS))
|
||||
|
||||
obj/libunix/%.o : CFLAGS += $(LARGEDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libunix/%.o : CFLAGS += $(SOFTFLOAT) -DUNIX_PATH_SEMANTICS
|
||||
obj/soft-float/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libunix/%.o : CFLAGS += $(SMALLDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj/small-data/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libunix/%.o : CFLAGS += $(BASEREL) -DUNIX_PATH_SEMANTICS
|
||||
obj/baserel/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libunix/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libunix/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/soft-float/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libunix/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/small-data/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libunix/%.o : CFLAGS += $(THREADSAFE) $(BASEREL) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/baserel/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libunix.a : $(addprefix obj/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libunix.a : $(addprefix obj/soft-float/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libunix.a : $(addprefix obj/small-data/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libunix.a : $(addprefix obj/baserel/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libunix.a : $(addprefix obj.threadsafe/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libunix.a : $(addprefix obj.threadsafe/soft-float/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libunix.a : $(addprefix obj.threadsafe/small-data/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libunix.a : $(addprefix obj.threadsafe/baserel/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
UNIX_LIB_COMMON := \
|
||||
unix.lib_rev.o \
|
||||
dirent_closedir.o \
|
||||
dirent_rewinddir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_open.o \
|
||||
fcntl_get_default_file.o \
|
||||
getopt_getopt_long.o \
|
||||
mount_convertinfo.o \
|
||||
mount_statfs.o \
|
||||
resource_getrlimit.o \
|
||||
resource_setrlimit.o \
|
||||
stat_chmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stdio_ctermid.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fopen.o \
|
||||
stdio_file_init.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_openiob.o \
|
||||
stdio_popen.o \
|
||||
stdio_record_locking.o \
|
||||
stdio_remove.o \
|
||||
stdio_rename.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_expand_wildcard.o \
|
||||
stdlib_expand_wildcard_check.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_system.o \
|
||||
systeminfo_sysinfo.o \
|
||||
termios_cfgetispeed.o \
|
||||
termios_cfgetospeed.o \
|
||||
termios_cfmakeraw.o \
|
||||
termios_cfsetispeed.o \
|
||||
termios_cfsetospeed.o \
|
||||
termios_console_fdhookentry.o \
|
||||
termios_tcdrain.o \
|
||||
termios_tcflow.o \
|
||||
termios_tcflush.o \
|
||||
termios_tcgetattr.o \
|
||||
termios_tcsendbreak.o \
|
||||
termios_tcsetattr.o \
|
||||
timeb_ftime.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_common_pathconf.o \
|
||||
unistd_def_path.o \
|
||||
unistd_def_path_delimiter.o \
|
||||
unistd_environ.o \
|
||||
unistd_execl.o \
|
||||
unistd_execle.o \
|
||||
unistd_execlp.o \
|
||||
unistd_execv.o \
|
||||
unistd_execve.o \
|
||||
unistd_execve_env_exit.o \
|
||||
unistd_execve_env_init.o \
|
||||
unistd_execve_exit.o \
|
||||
unistd_execvp.o \
|
||||
unistd_fpathconf.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_pathconf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_restorepathname.o \
|
||||
unistd_setcurrentpath.o \
|
||||
unistd_strip_double_slash.o \
|
||||
unistd_symlink.o \
|
||||
unistd_translatea2u.o \
|
||||
unistd_translaterel.o \
|
||||
unistd_translateu2a.o \
|
||||
unistd_truncate.o \
|
||||
unistd_ttyname.o \
|
||||
unistd_ttyname_r.o \
|
||||
unistd_unix_path_semantics.o \
|
||||
unistd_unlink.o \
|
||||
unistd_wildcard_expand.o \
|
||||
utime_utime.o
|
||||
|
||||
UNIX_LIB_OS3 :=
|
||||
|
||||
UNIX_LIB_OS4 := \
|
||||
stdlib_dlopen.o \
|
||||
termios_openserial.o \
|
||||
unistd_unlink_retries.o
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "m.lib 1.213"
|
||||
#define VSTRING "m.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: m.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "m.lib 1.215"
|
||||
#define VSTRING "m.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: m.lib 1.215 (26.6.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
215
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "m881.lib 1.213"
|
||||
#define VSTRING "m881.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: m881.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 214
|
||||
#define DATE "27.4.2017"
|
||||
#define VERS "m881.lib 1.214"
|
||||
#define VSTRING "m881.lib 1.214 (27.4.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: m881.lib 1.214 (27.4.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
214
|
||||
|
||||
@@ -93,6 +93,13 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef IsMinListEmpty
|
||||
#define IsMinListEmpty(ml) \
|
||||
((struct MinList *)((ml)->mlh_TailPred) == (struct MinList *)(ml))
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef AMIGA_COMPILER_H
|
||||
|
||||
#ifdef __SASC
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "net.lib 1.213"
|
||||
#define VSTRING "net.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: net.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "net.lib 1.215"
|
||||
#define VSTRING "net.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: net.lib 1.215 (26.6.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
215
|
||||
|
||||
@@ -136,7 +136,7 @@ profil(unsigned short *buffer, size_t bufSize, size_t offset, unsigned int scale
|
||||
ProfileData.CounterStart = GetCounterStart();
|
||||
|
||||
/* Set interrupt vector */
|
||||
CounterInt.is_Code = (void (*)())CounterIntFn;
|
||||
CounterInt.is_Code = (void (*)(void))CounterIntFn;
|
||||
CounterInt.is_Data = &ProfileData;
|
||||
IPM->SetInterruptVector(1, &CounterInt);
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ remove_locked_region_node(struct FileLockSemaphore * fls,struct fd * fd,LONG sta
|
||||
/* Check if there are any locked regions left.
|
||||
* If not, mark the entire file as unlocked.
|
||||
*/
|
||||
if(IsListEmpty((struct List *)&which_lock->fln_LockedRegionList))
|
||||
if(IsMinListEmpty(&which_lock->fln_LockedRegionList))
|
||||
{
|
||||
SHOWMSG("no more regions are locked; removing the file lock node");
|
||||
|
||||
@@ -705,7 +705,7 @@ cleanup_locked_records(struct fd * fd)
|
||||
}
|
||||
}
|
||||
|
||||
if(IsListEmpty((struct List *)&which_lock->fln_LockedRegionList))
|
||||
if(IsMinListEmpty(&which_lock->fln_LockedRegionList))
|
||||
{
|
||||
SHOWMSG("no more regions are locked; removing the file lock node");
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ alloca_cleanup(const char * file,int line)
|
||||
NewList((struct List *)&alloca_memory_list);
|
||||
|
||||
/* Is this worth cleaning up? */
|
||||
if(NOT IsListEmpty((struct List *)&alloca_memory_list))
|
||||
if(NOT IsMinListEmpty(&alloca_memory_list))
|
||||
{
|
||||
struct MemoryContextNode * mcn_prev;
|
||||
struct MemoryContextNode * mcn;
|
||||
@@ -120,7 +120,7 @@ alloca_cleanup(const char * file,int line)
|
||||
|
||||
/* Drop the cleanup callback if there's nothing to be cleaned
|
||||
up any more. */
|
||||
if(IsListEmpty((struct List *)&alloca_memory_list))
|
||||
if(IsMinListEmpty(&alloca_memory_list))
|
||||
__alloca_cleanup = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,13 +59,25 @@ __calloc(size_t num_elements,size_t element_size,const char * file,int line)
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
|
||||
/* This might overflow. */
|
||||
total_size = num_elements * element_size;
|
||||
|
||||
result = __malloc(total_size,file,line);
|
||||
if(result != NULL)
|
||||
memset(result,0,total_size);
|
||||
|
||||
/* No arithmetic overflow? */
|
||||
if(total_size >= num_elements)
|
||||
{
|
||||
result = __malloc(total_size,file,line);
|
||||
if(result != NULL)
|
||||
memset(result,0,total_size);
|
||||
else
|
||||
SHOWMSG("memory allocation failure");
|
||||
}
|
||||
/* Multiplying the number and size of elements overflows
|
||||
* the size_t range.
|
||||
*/
|
||||
else
|
||||
SHOWMSG("memory allocation failure");
|
||||
{
|
||||
D(("calloc(num_elements=%ld, element_size=%ld) overflow"));
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -75,14 +75,15 @@ struct MinList NOCOMMON __memory_list;
|
||||
/****************************************************************************/
|
||||
|
||||
void *
|
||||
__allocate_memory(size_t size,BOOL never_free,const char * UNUSED debug_file_name,int UNUSED debug_line_number)
|
||||
__allocate_memory(size_t size,BOOL never_free,const char *debug_file_name UNUSED,int debug_line_number UNUSED)
|
||||
{
|
||||
struct MemoryNode * mn;
|
||||
size_t allocation_size;
|
||||
void * result = NULL;
|
||||
size_t original_size;
|
||||
|
||||
#if defined(UNIX_PATH_SEMANTICS)
|
||||
size_t original_size;
|
||||
|
||||
{
|
||||
original_size = size;
|
||||
|
||||
@@ -417,7 +418,7 @@ STDLIB_DESTRUCTOR(stdlib_memory_exit)
|
||||
|
||||
if(__memory_list.mlh_Head != NULL)
|
||||
{
|
||||
while(NOT IsListEmpty((struct List *)&__memory_list))
|
||||
while(NOT IsMinListEmpty(&__memory_list))
|
||||
{
|
||||
((struct MemoryNode *)__memory_list.mlh_Head)->mn_AlreadyFree = FALSE;
|
||||
|
||||
@@ -453,12 +454,12 @@ STDLIB_DESTRUCTOR(stdlib_memory_exit)
|
||||
{
|
||||
#ifdef __MEM_DEBUG
|
||||
{
|
||||
while(NOT IsListEmpty((struct List *)&__memory_list))
|
||||
while(NOT IsMinListEmpty(&__memory_list))
|
||||
__free_memory_node((struct MemoryNode *)__memory_list.mlh_Head,__FILE__,__LINE__);
|
||||
}
|
||||
#else
|
||||
{
|
||||
while(NOT IsListEmpty((struct List *)&__memory_list))
|
||||
while(NOT IsMinListEmpty(&__memory_list))
|
||||
__free_memory_node((struct MemoryNode *)__memory_list.mlh_Head,NULL,0);
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
@@ -478,12 +479,12 @@ STDLIB_DESTRUCTOR(stdlib_memory_exit)
|
||||
{
|
||||
#ifdef __MEM_DEBUG
|
||||
{
|
||||
while(NOT IsListEmpty((struct List *)&__memory_list))
|
||||
while(NOT IsMinListEmpty(&__memory_list))
|
||||
__free_memory_node((struct MemoryNode *)__memory_list.mlh_Head,__FILE__,__LINE__);
|
||||
}
|
||||
#else
|
||||
{
|
||||
while(NOT IsListEmpty((struct List *)&__memory_list))
|
||||
while(NOT IsMinListEmpty(&__memory_list))
|
||||
__free_memory_node((struct MemoryNode *)__memory_list.mlh_Head,NULL,0);
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
|
||||
@@ -37,9 +37,13 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
|
||||
int
|
||||
mbtowc(wchar_t *pwc, const char *s, size_t n)
|
||||
mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(-1);
|
||||
errno = EILSEQ;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
static const char * error_table[EILSEQ - EPERM + 1] =
|
||||
static const char * error_table[ENOTSUP - EPERM + 1] =
|
||||
{
|
||||
"Operation not permitted",
|
||||
"No such file or directory",
|
||||
@@ -127,7 +127,8 @@ static const char * error_table[EILSEQ - EPERM + 1] =
|
||||
"Identifier removed",
|
||||
"No message of the desired type.",
|
||||
"Value too large to be stored in data type.",
|
||||
"Encoding error detected"
|
||||
"Encoding error detected",
|
||||
"Not supported"
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
@@ -139,7 +140,7 @@ strerror_r(int number,char * buffer,size_t buffer_size)
|
||||
const char * str;
|
||||
size_t len;
|
||||
|
||||
if(number < EPERM || number > EILSEQ)
|
||||
if(number < EPERM || number > ENOTSUP)
|
||||
{
|
||||
__set_errno(EINVAL);
|
||||
goto out;
|
||||
|
||||
75
library/string_strnlen.c
Normal file
75
library/string_strnlen.c
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* $Id: string_strlen.c,v 1.4 2006-01-08 12:04:27 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_NULL_POINTER_CHECK_H
|
||||
#include "stdlib_null_pointer_check.h"
|
||||
#endif /* _STDLIB_NULL_POINTER_CHECK_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef _STRING_HEADERS_H
|
||||
#include "string_headers.h"
|
||||
#endif /* _STRING_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
size_t
|
||||
strnlen(const char *s, size_t maxlen)
|
||||
{
|
||||
const char * start = s;
|
||||
size_t result = 0;
|
||||
|
||||
assert( s != NULL );
|
||||
|
||||
#if defined(CHECK_FOR_NULL_POINTERS)
|
||||
{
|
||||
if(s == NULL)
|
||||
{
|
||||
__set_errno(EFAULT);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
#endif /* CHECK_FOR_NULL_POINTERS */
|
||||
|
||||
while((maxlen != 0) && ((*s) != '\0'))
|
||||
{
|
||||
s++;
|
||||
maxlen--;
|
||||
}
|
||||
|
||||
result = (size_t)(s - start);
|
||||
|
||||
out:
|
||||
|
||||
return(result);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: time_mktime.c,v 1.10 2006-01-08 12:04:27 obarthel Exp $
|
||||
* $Id: time_mktime.c,v 1.11 2015-06-26 11:22:00 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -52,9 +52,10 @@ mktime(struct tm *tm)
|
||||
{
|
||||
DECLARE_UTILITYBASE();
|
||||
struct ClockData clock_data;
|
||||
ULONG seconds, delta;
|
||||
ULONG seconds;
|
||||
time_t result = (time_t)-1;
|
||||
int max_month_days;
|
||||
LONG combined_seconds;
|
||||
int month, year;
|
||||
|
||||
ENTER();
|
||||
|
||||
@@ -73,116 +74,63 @@ mktime(struct tm *tm)
|
||||
}
|
||||
#endif /* CHECK_FOR_NULL_POINTERS */
|
||||
|
||||
/* The month must be valid. */
|
||||
if(tm->tm_mon < 0 || tm->tm_mon > 11)
|
||||
/* Normalize the year and month. */
|
||||
year = tm->tm_year + 1900;
|
||||
month = tm->tm_mon + 1;
|
||||
|
||||
if(month < 0 || month > 12)
|
||||
{
|
||||
SHOWVALUE(tm->tm_mon);
|
||||
SHOWMSG("invalid month");
|
||||
goto out;
|
||||
int y;
|
||||
|
||||
y = month / 12;
|
||||
|
||||
month -= y * 12;
|
||||
year += y;
|
||||
}
|
||||
|
||||
/* The day of the month must be valid. */
|
||||
if(tm->tm_mday < 1 || tm->tm_mday > 31)
|
||||
if(month < 1)
|
||||
{
|
||||
SHOWVALUE(tm->tm_mday);
|
||||
SHOWMSG("invalid day of month");
|
||||
goto out;
|
||||
month += 12;
|
||||
year -= 1;
|
||||
}
|
||||
|
||||
/* The year must be valid. */
|
||||
if(tm->tm_year < 78)
|
||||
/* The year must be valid. Amiga time begins with January 1st, 1978. */
|
||||
if(year < 1978)
|
||||
{
|
||||
SHOWVALUE(tm->tm_year);
|
||||
SHOWVALUE(year);
|
||||
SHOWMSG("invalid year");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Is this the month of February? */
|
||||
if(tm->tm_mon == 1)
|
||||
{
|
||||
int year;
|
||||
|
||||
/* We need to have the full year number for the
|
||||
leap year calculation below. */
|
||||
year = tm->tm_year + 1900;
|
||||
|
||||
/* Now for the famous leap year calculation rules... In
|
||||
the given year, how many days are there in the month
|
||||
of February? */
|
||||
if((year % 4) != 0)
|
||||
max_month_days = 28;
|
||||
else if ((year % 400) == 0)
|
||||
max_month_days = 29;
|
||||
else if ((year % 100) == 0)
|
||||
max_month_days = 28;
|
||||
else
|
||||
max_month_days = 29;
|
||||
}
|
||||
else
|
||||
{
|
||||
static const char days_per_month[12] =
|
||||
{
|
||||
31, 0,31,
|
||||
30,31,30,
|
||||
31,31,30,
|
||||
31,30,31
|
||||
};
|
||||
|
||||
max_month_days = days_per_month[tm->tm_mon];
|
||||
}
|
||||
|
||||
/* The day of the month must be valid. */
|
||||
if(tm->tm_mday < 0 || tm->tm_mday > max_month_days)
|
||||
{
|
||||
SHOWVALUE(tm->tm_mday);
|
||||
SHOWMSG("invalid day of month");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* The hour must be valid. */
|
||||
if(tm->tm_hour < 0 || tm->tm_hour > 23)
|
||||
{
|
||||
SHOWVALUE(tm->tm_hour);
|
||||
SHOWMSG("invalid hour");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* The minute must be valid. */
|
||||
if(tm->tm_min < 0 || tm->tm_min > 59)
|
||||
{
|
||||
SHOWVALUE(tm->tm_min);
|
||||
SHOWMSG("invalid minute");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Note: the number of seconds can be larger than 59
|
||||
in order to account for leap seconds. */
|
||||
if(tm->tm_sec < 0 || tm->tm_sec > 60)
|
||||
{
|
||||
SHOWVALUE(tm->tm_sec);
|
||||
SHOWMSG("invalid seconds");
|
||||
goto out;
|
||||
}
|
||||
|
||||
clock_data.sec = (tm->tm_sec > 59) ? 59 : tm->tm_sec;
|
||||
clock_data.min = tm->tm_min;
|
||||
clock_data.hour = tm->tm_hour;
|
||||
clock_data.mday = tm->tm_mday;
|
||||
clock_data.month = tm->tm_mon + 1;
|
||||
clock_data.year = tm->tm_year + 1900;
|
||||
|
||||
seconds = Date2Amiga(&clock_data) + (tm->tm_sec - 59);
|
||||
|
||||
/* The AmigaOS "epoch" starts with January 1st, 1978, which was
|
||||
a Sunday. */
|
||||
tm->tm_wday = (seconds / (24 * 60 * 60)) % 7;
|
||||
|
||||
/* Convert the first day of the month in the given year
|
||||
into the corresponding number of seconds. */
|
||||
memset(&clock_data, 0, sizeof(clock_data));
|
||||
|
||||
clock_data.mday = 1;
|
||||
clock_data.month = 1;
|
||||
clock_data.month = month;
|
||||
clock_data.year = year;
|
||||
|
||||
delta = Date2Amiga(&clock_data);
|
||||
seconds = Date2Amiga(&clock_data);
|
||||
|
||||
tm->tm_yday = (seconds - delta) / (24 * 60 * 60);
|
||||
/* Put the combined number of seconds involved together,
|
||||
covering the seconds/minutes/hours of the day as well
|
||||
as the number of days of the month. This will be added
|
||||
to the number of seconds for the date. */
|
||||
combined_seconds = tm->tm_sec + 60 * (tm->tm_min + 60 * (tm->tm_hour + 24 * (tm->tm_mday-1)));
|
||||
|
||||
/* If the combined number of seconds is negative, adding it
|
||||
* to the number of seconds for the date should not produce
|
||||
* a negative value.
|
||||
*/
|
||||
if(combined_seconds < 0 && seconds < (ULONG)(-combined_seconds))
|
||||
{
|
||||
SHOWVALUE(seconds);
|
||||
SHOWVALUE(combined_seconds);
|
||||
SHOWMSG("invalid combined number of seconds");
|
||||
goto out;
|
||||
}
|
||||
|
||||
seconds += combined_seconds;
|
||||
|
||||
__locale_lock();
|
||||
|
||||
@@ -193,10 +141,13 @@ mktime(struct tm *tm)
|
||||
|
||||
__locale_unlock();
|
||||
|
||||
/* Finally, adjust for the difference between the Unix and the
|
||||
/* Adjust for the difference between the Unix and the
|
||||
AmigaOS epochs, which differ by 8 years. */
|
||||
result = seconds + UNIX_TIME_OFFSET;
|
||||
|
||||
/* Finally, normalize the provided time and date information. */
|
||||
localtime_r(&result, tm);
|
||||
|
||||
out:
|
||||
|
||||
RETURN(result);
|
||||
|
||||
48
library/time_tzset.c
Normal file
48
library/time_tzset.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* $Id: $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2017 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _TIME_HEADERS_H
|
||||
#include "time_headers.h"
|
||||
#endif /* _TIME_HEADERS_H */
|
||||
|
||||
#ifndef _LOCALE_HEADERS_H
|
||||
#include "locale_headers.h"
|
||||
#endif /* _LOCALE_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void
|
||||
tzset(void)
|
||||
{
|
||||
/* For now, do nothing. */
|
||||
}
|
||||
@@ -69,7 +69,7 @@ CLIB_DESTRUCTOR(unistd_exit)
|
||||
|
||||
PROFILE_OFF();
|
||||
|
||||
if(__unlink_list.mlh_Head != NULL && NOT IsListEmpty((struct List *)&__unlink_list))
|
||||
if(__unlink_list.mlh_Head != NULL && NOT IsMinListEmpty(&__unlink_list))
|
||||
{
|
||||
struct UnlinkNode * uln;
|
||||
BPTR old_dir;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: unistd_translateu2a.c,v 1.12 2010-08-20 15:33:36 obarthel Exp $
|
||||
* $Id: unistd_translateu2a.c,v 1.13 2015-06-26 11:22:00 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -477,7 +477,10 @@ __translate_unix_to_amiga_path_name(char const ** name_ptr,struct name_translati
|
||||
for(i = j = 0 ; i < len ; i++)
|
||||
{
|
||||
if(i < len - 3 && name[i] == '/' && name[i + 1] == '.' && name[i + 2] == '.' && name[i + 3] == '/')
|
||||
i += 2;
|
||||
{
|
||||
replace[j++] = '/';
|
||||
i += 3;
|
||||
}
|
||||
|
||||
replace[j++] = name[i];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "unix.lib 1.213"
|
||||
#define VSTRING "unix.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: unix.lib 1.213 (4.12.2016)"
|
||||
#define REVISION 215
|
||||
#define DATE "26.6.2017"
|
||||
#define VERS "unix.lib 1.215"
|
||||
#define VSTRING "unix.lib 1.215 (26.6.2017)\r\n"
|
||||
#define VERSTAG "\0$VER: unix.lib 1.215 (26.6.2017)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
213
|
||||
215
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
size_t
|
||||
mbrlen(wchar_t *pwc, const char * s, size_t n, mbstate_t *ps)
|
||||
mbrlen(const char *restrict s, size_t n, mbstate_t *restrict ps)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
}
|
||||
#endif /* __STDC_VERSION__ && __STDC_VERSION__ >= 199901L */
|
||||
|
||||
|
||||
64
library/wchar_mbrtowc.c
Normal file
64
library/wchar_mbrtowc.c
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* $Id: wchar_mbrlen.c,v 1.3 2006-01-08 12:04:27 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _WCHAR_HEADERS_H
|
||||
#include "wchar_headers.h"
|
||||
#endif /* _WCHAR_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Mostly non-working stub based on bionic */
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
size_t
|
||||
mbrtowc(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps)
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
s = "";
|
||||
pwc = NULL;
|
||||
}
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
if (pwc)
|
||||
*pwc = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pwc)
|
||||
*pwc = *s;
|
||||
|
||||
return (*s != 0);
|
||||
}
|
||||
#endif /* __STDC_VERSION__ && __STDC_VERSION__ >= 199901L */
|
||||
@@ -40,6 +40,5 @@
|
||||
int
|
||||
mbsinit(const mbstate_t *ps)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return !ps || !*(unsigned *)ps;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
vswprintf(char *s, const wchar_t *format,va_list arg)
|
||||
vswprintf(wchar_t *s, size_t maxlen, const wchar_t *format, va_list arg)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
|
||||
@@ -35,11 +35,13 @@
|
||||
#include "wchar_headers.h"
|
||||
#endif /* _WCHAR_HEADERS_H */
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
wchar_t *
|
||||
wcscat(wchar_t *dest, const wchar_t *src)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wcscpy(dest + wcslen(dest), src);
|
||||
return dest;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wcschr(const wchar_t *s, wchar_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
if (!c) return (wchar_t *)s + wcslen(s);
|
||||
for (; *s && *s != c; s++);
|
||||
return *s ? (wchar_t *)s : 0;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@
|
||||
int
|
||||
wcscmp(const wchar_t *s1, const wchar_t * s2)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
for (; *s1==*s2 && *s1 && *s2; s1++, s2++);
|
||||
return *s1 - *s2;
|
||||
}
|
||||
|
||||
45
library/wchar_wcscoll.c
Normal file
45
library/wchar_wcscoll.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* $Id: wchar_wscoll.c,v 1.3 2006-01-08 12:04:27 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _WCHAR_HEADERS_H
|
||||
#include "wchar_headers.h"
|
||||
#endif /* _WCHAR_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
wcscoll(const wchar_t *ws1, const wchar_t *ws2)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
}
|
||||
@@ -40,6 +40,7 @@
|
||||
wchar_t *
|
||||
wcscpy(wchar_t *dest, const wchar_t *src)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wchar_t *a = dest;
|
||||
while ((*dest++ = *src++));
|
||||
return a;
|
||||
}
|
||||
|
||||
50
library/wchar_wcscspn.c
Normal file
50
library/wchar_wcscspn.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* $Id: wchar_wcsspn.c,v 1.3 2006-01-08 12:04:27 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _WCHAR_HEADERS_H
|
||||
#include "wchar_headers.h"
|
||||
#endif /* _WCHAR_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
size_t
|
||||
wcscspn(const wchar_t *s, const wchar_t *c)
|
||||
{
|
||||
const wchar_t *a;
|
||||
if (!c[0]) return wcslen(s);
|
||||
if (!c[1]) return (s=wcschr(a=s, *c)) ? (size_t)(s-a) : wcslen(a);
|
||||
for (a=s; *s && !wcschr(c, *s); s++);
|
||||
return s-a;
|
||||
}
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
size_t
|
||||
wcslen(const wchar_t *s)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
const wchar_t *a;
|
||||
for (a=s; *s; s++);
|
||||
return s-a;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,14 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wcsncat(wchar_t *dest, const wchar_t *src, size_t n)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wchar_t *a = dest;
|
||||
dest += wcslen(dest);
|
||||
while (n && *src) n--, *dest++ = *src++;
|
||||
*dest++ = 0;
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,11 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
int
|
||||
wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
for (; n && *s1==*s2 && *s1 && *s2; n--, s1++, s2++);
|
||||
return n ? *s1 - *s2 : 0;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,13 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wcsncpy(wchar_t *dest, const wchar_t *src, size_t n)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wchar_t *a = dest;
|
||||
while (n && *src) n--, *dest++ = *src++;
|
||||
wmemset(dest, 0, n);
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
wchar_t
|
||||
wchar_t *
|
||||
wcspbrk(const wchar_t *s, const wchar_t *set)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
|
||||
45
library/wchar_wctob.c
Normal file
45
library/wchar_wctob.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* $Id: wchar_wmemchr.c,v 1.3 2006-01-08 12:04:27 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _WCHAR_HEADERS_H
|
||||
#include "wchar_headers.h"
|
||||
#endif /* _WCHAR_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
wctob(wint_t c)
|
||||
{
|
||||
if (c < 128U) return c;
|
||||
return EOF;
|
||||
}
|
||||
@@ -37,9 +37,11 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wmemchr(const wchar_t *ptr, wchar_t val, size_t len)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
for (; len && *ptr != val; len--, ptr++);
|
||||
return len ? (wchar_t *)ptr : 0;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,11 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
int
|
||||
wmemcmp(const wchar_t *ptr1, const wchar_t *ptr2, size_t len)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
for (; len && *ptr1==*ptr2; len--, ptr1++, ptr2++);
|
||||
return len ? *ptr1-*ptr2 : 0;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wmemcpy(wchar_t *dest, const wchar_t *src, size_t len)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wchar_t *a = dest;
|
||||
while (len--) *dest++ = *src++;
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,15 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wmemmove(wchar_t *dest, const wchar_t * src, size_t len)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wchar_t *d0 = dest;
|
||||
if ((size_t)(dest-src) < len)
|
||||
while (len--) dest[len] = src[len];
|
||||
else
|
||||
while (len--) *dest++ = *src++;
|
||||
return d0;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
wchar_t *
|
||||
wmemset(wchar_t *ptr, int val, size_t len)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(NULL);
|
||||
wchar_t *ret = ptr;
|
||||
while (len--) *ptr++ = val;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,10 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
int
|
||||
iswalnum(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return iswdigit(c) || iswalpha(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswalpha(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isalpha(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,14 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Implementation based on musl */
|
||||
|
||||
int
|
||||
iswblank(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isblank(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswcntrl(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return iscntrl(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswdigit(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isdigit(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswgraph(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isgraph(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswlower(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return islower(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswpunc(wint_t c)
|
||||
iswpunct(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return ispunct(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswspace(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isspace(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswupper(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isupper(c);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#include <wctype.h>
|
||||
#endif /* _WCTYPE_HEADERS_H */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
iswxdigit(wint_t c)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
return isxdigit(c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user