Skip to content

Commit

Permalink
Merge pull request #61 from afxgroup/beta5
Browse files Browse the repository at this point in the history
Beta5
  • Loading branch information
afxgroup authored Aug 12, 2022
2 parents 8f72dbd + 469df10 commit 33f863d
Show file tree
Hide file tree
Showing 434 changed files with 14,176 additions and 103,896 deletions.
9 changes: 3 additions & 6 deletions GNUmakefile.os4
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ OUTPUT_LIB = $(BUILD_DIR)/lib

WARNINGS := \
-Wall -W -Wextra -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
-Wundef -Wmissing-declarations -Wunused -Wwrite-strings -Wno-array-bounds -Wno-unused-value -Wno-comment \
-Wno-deprecated-declarations -Wno-sign-compare -Wno-cast-function-type -Wno-unused-variable \
-Wundef -Wmissing-declarations -Wunused -Wwrite-strings -Wno-array-bounds -Wno-missing-braces -Wno-unused-value -Wno-comment \
-Wno-deprecated-declarations -Wno-sign-compare -Wno-cast-function-type -Wno-unused-variable -Wno-parentheses \
-Wstrict-aliasing -Wno-shadow -Wno-implicit-fallthrough # -Werror -Wbad-function-cast -Wconversion -Wformat

PIC := -fPIC
Expand Down Expand Up @@ -91,7 +91,7 @@ INCLUDES := -I$(LIB_DIR)/include \
SHARED := $(if $(SHARED),$(SHARED),yes)
STATIC := $(if $(STATIC),$(STATIC),yes)

OPTIONS := -msdata=data -DHAVE_SYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib
OPTIONS := -msdata=data -DHAVE_SYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__CLIB2__ -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU
OPTIMIZE := -O2 -mmultiple -mupdate -mstrict-align

ifndef DEBUG
Expand Down Expand Up @@ -124,7 +124,6 @@ include libm.gmk
include libamiga.gmk
include libprofile.gmk
include libcrypt.gmk
include libresolv.gmk

prepare:
-$(MAKEDIR) $(INSTALL_PREFIX)/lib
Expand Down Expand Up @@ -159,12 +158,10 @@ version:
$(COPY) c.lib_rev.rev amiga.lib_rev.rev
$(COPY) c.lib_rev.rev profile.lib_rev.rev
$(COPY) c.lib_rev.rev m.lib_rev.rev
$(COPY) c.lib_rev.rev resolv.lib_rev.rev
bumprev amiga.lib
bumprev c.lib
bumprev profile.lib
bumprev m.lib
bumprev resolv.lib

##############################################################################

Expand Down
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# clib2 – A C runtime library for AmigaOS4

[![Build Status](https://travis-ci.org/afxgroup/clib2.svg?branch=master)](https://travis-ci.org/afxgroup/clib2)
[![Build Status](https://travis-ci.com/afxgroup/clib2.svg?branch=master)](https://travis-ci.org/afxgroup/clib2)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)


Expand All @@ -13,29 +13,29 @@ Te goal is to try to make it <a href="POSIX.md">POSIX</a> compliant and fix also
All warnings (except really few one) produced by GCC 10 and above are now gone.
All **deprecated** OS4 functions are replaced by modern one (except for StackSwap i don't find the replacement)

For the original readme follow this <a href="https://github.com/adtools/clib2">link</a>
For the original README follow this <a href="https://github.com/adtools/clib2">link</a>

## Limitations and caveats

The new functions and code most of the time is tested. Also some tests has been added to be sure that added featrues and functions are working correctly. Usually all new functions has been tested against linux. If you find any issue please <a href="https://github.com/afxgroup/clib2/issues">report it</a>.
The new functions and code most of the time is tested. Also some tests has been added to be sure that added features and functions are working correctly. Usually all new functions has been tested against linux. If you find any issue please <a href="https://github.com/afxgroup/clib2/issues">report it</a>.

### Libraries

Clib2 now has also a working shared version called `libc.so`. And of course also all other libs. Don't use newlib .so files when linking because **it will not work**

If you want to use `dlopen`/`dlsym` with shared objects:

**YOU HAVE** to compile your Clib2 version of library you want to use!
**YOU MUST** compile your Clib2 version of library you want to use!
**DON'T TRY TO USE** newlib shared objects because it will crash badly!
**DON'T USE** static libraries otherwise you could have undefined symbols!

The plain `libc.a` now contains also `libnet.a`, `libunix.a`. Socket support and floating point support are always enabled
Soft float version is no longer available.

Clib2 define `__THREAD_SAFE` if you need it to check if the library supports it
Clib2 define `__THREAD_SAFE` used to check if the library is thread safe

If you want to use the shared version remember to pack your OS4 software with all clib2 shared objects othwerwise the elf loader will try to load objects from SOBJS: and it will load newlib one.
**DON'T overwrite SOBJS: files with your Clib2 files** othwerise OS4 most probably will not load or you could have problems running software!
If you want to use the shared version of library remember to pack your OS4 software with all clib2 shared objects othwerwise the elf loader will try to load objects from SOBJS: and it will load newlib one.
**DON'T overwrite SOBJS: files with your Clib2 files** othwerise OS4 most probably will not load them and you could have problems running existent software!

### New memory allocator

Expand All @@ -44,7 +44,7 @@ Clib2 now use `Wheel Of Fortune` allocator that is faster than previous one an i
### Optimized AMCC functions

Some functions like (memchr, memcmp, memcpy and some other) are optimized for SAM440 and SAM460.
Feel free to add other CPU versions
Feel free to add other CPU versions.

### Altivec

Expand All @@ -60,10 +60,11 @@ So if you want to use libstdc++ it is better to remove it and link against the s

### Large file support

Large files are now supported and tested (A working version of p7zip has been teste with a 8GB file without any problem).
Large files are now supported and tested (A working version of p7zip has been tested with a 8GB file without any problem).

### SYSV functions

clib2 now contains **shm*** and **msg*** functions. It needs <a href="http://www.os4depot.net/share/development/library/misc/sysvipc.lha">SYSV IPC</a> library. If you don't install it those functions will not work and will return to you an **ENOSYS** error.
Clib2 now contains **shm*** and **msg*** functions. It needs <a href="http://www.os4depot.net/share/development/library/misc/sysvipc.lha">SYSV IPC</a> library. If you don't install it those functions will not work and will return to you an **ENOSYS** error.

### Unix path support

Expand Down Expand Up @@ -103,7 +104,8 @@ Clib2 now contain also libauto with almost all OS4 components. We'll try to keep

### libresolv

Added resolv library to use dns functions. It needs libpthread.a
Added resolv library to use dns functions. A lot of socket functions that was using bsdsocket.library now use this library.
And thanks to this library more functions have been added to socket library

### libcrypt

Expand Down Expand Up @@ -138,13 +140,18 @@ Number of characters in salt DES: Fixed to 2 characters (only the first 2 charac

About the security of the hash algorithm DES<MD5<SHA-256<SHA-512 And, the larger the id number, the higher the safety.

User `-lcrypt` option when linking.
Use `-lcrypt` option when linking.

### debug
### Debug

To use `debug` functions you have to explicitly pass `DEBUG=true` to GNUMakefile.os4 and
debug functions will be enabled

### Misc

Clib2 now supports opening directories with open() and opendir() functions. There are also new other functions that are used with fd int files.
Check `fcntl.h` for details

### Known problems

Don't call `exit()` function in an `alarm()` handler otherwise your program will be stuck at exit.
Expand Down
Loading

0 comments on commit 33f863d

Please sign in to comment.