1. 07 Mar, 2005 1 commit
  2. 27 Oct, 2004 1 commit
    • Ben Avison's avatar
      Bugfix and system mode support. · 38e071b3
      Ben Avison authored
      Detail:
        * Fixed signed pointer comparison: most top-bit-set pointers passed to
          _kernel_raise_error() were being translated into "Exit called"
        * Stack extension is now permitted in SYS mode; includes support in longjmp()
      Admin:
        Verified that stack extension works.
      
      Version 5.51. Tagged as 'RISC_OSLib-5_51'
      38e071b3
  3. 01 Jul, 2004 1 commit
  4. 23 Jan, 2004 1 commit
    • Kevin Bracey's avatar
      <ctype.h> * isblank() added. · 8f9cfb8a
      Kevin Bracey authored
                * isprint() now true for non-breaking spaces
      <math.h>  * FP_INFINITY corrected to FP_INFINITE
                * fma(), fmal(), llrint(), llrintf(), llrintl(),
                  llround(), llroundf(), llroundl(),
                  remquo(), remquof(), remquol() added.
                * added inlining for remainder() and fmaf() and various
                  float functions.
                * math_errhandling removed pending overhaul - it was misleading.
                * expm1() and log1p() now provide decent (< 1 ulp) accuracy,
                  rather than only being marginally better than exp(x)-1 and
                  log(1+x).
                * new version of copysign() with standard calling conventions.
                * some C99 functions changed to use infinity/NaNs and exceptions
                  for error handling - see comments in header file about the
                  changes in progress.
      <stdio.h>  * output from %a now correctly rounded
      <stdlib.h> * strtof() and strtold() added.
      <string.h> * strerror() no longer clears _kernel_last_oserror().
      
      Version 5.49. Tagged as 'RISC_OSLib-5_49'
      8f9cfb8a
  5. 02 Dec, 2003 1 commit
    • Ben Avison's avatar
      Changes for Customer W; also suitable for building on an Iyonix. · 20ee3c3f
      Ben Avison authored
      Detail:
        * No longer uses aasm to build h.swis.
        * (Only) compatible with new C compilers: assumes const static data is
          placed in separate read-only areas, and suitable command-line switch
          is used to ensure that library static data is never placed in a zero-
          init area.
        * Stack extension code now thread-safe.
        * Heap thread-safety code (in clib) now uses SWP instruction test results
          from stack extension code (in kernel) - as a side effect, the exported
          symbol _swp_available now exists, if you need to use it elsewhere.
        * Slightly closer to having top-bit-set heap addresses working.
      Admin:
        Tested in a Tungsten build, and with Customer W's test suite.
      
      Version 5.48. Tagged as 'RISC_OSLib-5_48'
      20ee3c3f
  6. 03 Nov, 2003 1 commit
    • Ben Avison's avatar
      Ansilib improvements, and a bugfix to system() · 1c7c8124
      Ben Avison authored
      Detail:
        * _kernel_irqs_disabled() is included in ansilib build, now needed for
          ARM 2 SWP replacement in c.alloc
        * _kernel_entrypoint() for ansilib now initialises relocation offsets in
          root stack chunk, necessary if linking with -zm object code
        * system() implementation now calls DDEUtils_FlushCL if starting a
          short command line - necessary in case previous system() call was a
          long command line directed at a DDE-unaware application
      Admin:
        Ansilib changes tested, DDE change not expected to cause problems.
      
      Version 5.47. Not tagged
      1c7c8124
  7. 13 Oct, 2003 1 commit
  8. 09 Oct, 2003 1 commit
    • Ben Avison's avatar
      Changes required for Customer W. · d08d7612
      Ben Avison authored
      Detail:
        * Implemented the thread-safety mutex macros for the user mode heap.
        * Created ansilibm, a version of ansilib suitable for building modules.
        * Fixed an overestimation of the size of the workspace passed to
          SharedCLibrary_LibInitModule[APCS_32] by the stubs.
        * Fixed bug in SharedCLibrary_LibInitModule[APCS_32] regarding handling of
          non-reentrant modules - if module code was at a higher address than the
          module data, then all the intervening data would be pointlessly copied
          back over itself with no allowance for volatility.
        * Removed the bsearch source file, since it was only required for APCS-A
          which the library has not supported since the year 2000, and which the
          compiler is now no longer able to build.
      Admin:
        ansilibm builds working modules, but thread safety has not been
        extensively tested.
      
      Version 5.47. Tagged as 'RISC_OSLib-5_47'
      d08d7612
  9. 15 Apr, 2003 1 commit
    • Kevin Bracey's avatar
      * __assert2() added to support for C99 assert(), which displays function name. · f126a1ab
      Kevin Bracey authored
      * _Exit() added.
      * Lots of new <math.h> functions (acosh, asinh, atanh, exp2, expm1,
        ilogb, log1p, log2, logb, scalbn, scalbln, cbrt, erf, erfc,
        lgamma, tgamma, nexttoward, fmaf). Float and long double forms
        of every function added; long double forms are included as another
        library object in the stubs rather than the shared library, as they
        just branch to the double form.
      * Subnormal/NaN/infinity cases in various <math.h> functions improved.
      * Added <tgmath.h>.
      * Headers brought into line with CC 5.54.
      * RMEnsures added to C library initialisation to try to load minimum
        CallASWI, FPEmulator, CLib. No errors reported if load fails.
      * A few pointless inter-file dependencies removed to reduce minimum
        size of included ANSILib.
      
      Version 5.46. Tagged as 'RISC_OSLib-5_46'
      f126a1ab
  10. 17 Jan, 2003 1 commit
  11. 16 Jan, 2003 1 commit
    • Ben Avison's avatar
      Misc changes. · aa313346
      Ben Avison authored
      Detail:
        * Improved lookup of application Sprites file: uses Wimp_Extend 13 (in
          Wimps that support it) to work out the appropriate resolution suffix,
          and prefixes with "<Wimp$IconTheme>" to allow a future Theme Manager
          to operate.
        * Preserves attributes of any existing file when saving sprite or text
          files.
        * Changed two null menu handles from 0 to (doucmented) -1. Despite the
          fact that the Wimp is actually happy with 0 as a null handle here,
          this was reported as a fault.
        * Changed rlib.c.version to use VersionNum, deleted thereby-obsoleted
          rlib.h.VerIntern.version file. Not that rlib.c.version seems to be used
          at the moment.
        * Added Kevin's additions to the test directory.
      Admin:
        Tested briefly.
      
      Version 5.44. Not tagged
      aa313346
  12. 15 Nov, 2002 1 commit
    • Kevin Bracey's avatar
      ROM build fixed for 64-bit stuff. · f207fcb2
      Kevin Bracey authored
      PCI added to swis.h
      alloc.c updated to handle bigger slots (new code merged from ARM libraries)
      Various 32-bit fixes for backtracing, and general trap handling.
      Polite "Application is not 32-bit compatible" message.
      Headers <stdint.h> and <inttypes.h> fixed to work in non-C99 mode.
      txt changed to do new-style Delete behaviour
      
      Version 5.44. Tagged as 'RISC_OSLib-5_44'
      f207fcb2
  13. 12 Aug, 2002 1 commit
    • Ben Avison's avatar
      How did we not notice this before? · 45c70245
      Ben Avison authored
      Detail:
        Fixed a stack imbalance in _memcpy that's been there since 32-bitting.
      Admin:
        Not tested yet.
      
      Version 5.43. Tagged as 'RISC_OSLib-5_43'
      45c70245
  14. 23 Jul, 2002 1 commit
  15. 22 May, 2002 1 commit
    • Kevin Bracey's avatar
      * Added two new library chunks, 4 and 5, which contain extensions to the... · 89eac61e
      Kevin Bracey authored
      * Added two new library chunks, 4 and 5, which contain extensions to the kernel and C library respectively. These have no static data associated with them, just being extensions of the stub tables. The reason for this is to minimise wasted space in programs that don't use the C99 facilities; o.stubs is now a library split into 3 pieces - basic kernel and CLib, extra kernel and extra
      
        CLib; only the bits a program needs get included.
      
      * Previous extensions to the C library stubs revoked - they now stop at _swix;
        all the new C99 functions now live in chunk 4. Anyone using those new
        functions should relink with new stubs and ensure this C library version.
      
      * printf/scanf now support 64-bit types through "ll" and "j" length modifiers.
      
      * Run-time support for VLAs (__rt_allocauto and __rt_freeauto) added. No
        attempt is currently made to clear up on longjmp or to cope with someone
        changing the kernel allocator while a VLA is active. These would be a
        future enhancement.
      
      * Added complete 64-bit run-time support (48 functions) to kernel library;
        these functions are compatible with the ones used by the ARM ADS. Many of
        the simpler functions will not normally be used by the compiler, as it
        will generate inline code. There is scope for improvement by switching
        in MULL and CLZ-using forms of multiply and divide when possible.
      
      * llabs and lldiv added to C library.
      
      * Header files corrected in a few areas, and changed to match the C compiler.
        <stdint.h> and <stdbool.h> now require the compiler to be in C99 mode
        (as detected using __STDC_VERSION__).
      
      
      Version 5.41. Tagged as 'RISC_OSLib-5_41'
      89eac61e
  16. 12 Apr, 2002 1 commit
  17. 11 Apr, 2002 1 commit
  18. 26 Mar, 2002 1 commit
    • Kevin Bracey's avatar
      * Added C99 extensions to strftime(). All basic specifiers supported, but "E"... · 84335a9f
      Kevin Bracey authored
      * Added C99 extensions to strftime(). All basic specifiers supported, but "E" and "O" modifiers ignored.
      
      * strftime specifiers %c, %X and %x for "C" locale changed to match C99.
      * Optimised hypot[f].
      * Missing hypotf() declaration added to <math.h>.
      * Fixed Shared C Library - inadvertent change to static data size meant it was
        incompatible with the stubs.
      
      Version 5.38. Tagged as 'RISC_OSLib-5_38'
      84335a9f
  19. 21 Mar, 2002 1 commit
    • Kevin Bracey's avatar
      Added the following C99 features: · f464cdae
      Kevin Bracey authored
        * snprintf(), vsnprintf(), vfscanf(), vscanf(), vsscanf()
        * hh, j, z and t printf length modifiers (indicating char, intmax_t, size_t
          and ptrdiff_t respectively)
        * Hexadecimal floating-point printing and scanning (%a/%A)
        * %F printf() specifier (upper-case form of %F)
        * Input/output of NaNs and Infinities
        * imaxdiv_t, imaxdiv(), strtoimax(), strtoumax() (simulated through macros)
        * <fenv.h>: feclearexcept(), fegetexceptflag(), feraiseexcept(),
                    fesetexceptflag(), fetestexcept(), fegetround(), fesetround(),
                    fegetenv(), feholdexcept(), fesetenv(), feupdateenv()
        * FLT_EVAL_METHOD, DECIMAL_DIG
        * hypot(), hypotf(), fabsf(), fdim(), fdimf(), fmax(), fmaxf(), fmin(),
          fminf()
        * INFINITY, NAN, fpclassify(), isfinite(), isinf(), isnan(), isnormal(),
          signbit(), copysign(), copysignf(), nan(), nanf(), nextafter(),
          nextafterf() isgreater(), isgreaterequal(), isless(), islessequal(),
          islessgreater(), isunordered()
      
      This involves adding 36 new entries to the stubs. Current versions of the C
      library will not fault client programs with such larger stubs, but will fill
      in the extra entries with junk. Programs requiring the new functions will have
      to RMEnsure this version of the Shared C Library.
      
      This version of the C library has been fixed so that in future, any extra
      unknown stubs entries will be filled in with a branch to zero, rather than
      corrupted.
      
      Requires cc 5.41 or later, both to build, and to make use of some of the extra
      facilities.
      
      
      Version 5.37. Tagged as 'RISC_OSLib-5_37'
      f464cdae
  20. 22 Feb, 2002 1 commit
  21. 29 Jan, 2002 1 commit
    • Kevin Bracey's avatar
      Abort and error handling massively overhauled: · 350370aa
      Kevin Bracey authored
        Aborts now give standard error messages (Abort on Data Transfer at... etc)
        *ShowRegs now filled in after aborts
        assert(), abort(), "free failed" and standard signal handlers now use Wimp
          error boxes if in the desktop
        Postmortem button on error boxes to view the postmortem
      
      Also, x$multiply, x$divide, __rt_sdiv, x$remainder, x$udivide, __rt_udiv and
      x$uremainder optimised.
      
      Version 5.35. Tagged as 'RISC_OSLib-5_35'
      350370aa
  22. 23 Aug, 2001 1 commit
  23. 10 May, 2001 1 commit
    • Stewart Brodie's avatar
      Fix for strxfrm() · 8159da18
      Stewart Brodie authored
      Detail:
        strxfrm was passing the buffers to the Territory module SWI the wrong
          way around so Territory_TransformString copied the destination over
          the source rather than vice versa!
      Admin:
        Reported by <mailto:ian.foster@gps.tandb.co.uk>
        Fixes Bugzilla bug #4375
      
      
      Version 5.33. Tagged as 'RISC_OSLib-5_33'
      8159da18
  24. 17 Apr, 2001 1 commit
  25. 11 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      strcmp() fix was broken. · 534e1478
      Stewart Brodie authored
      Detail:
        This alternate implementation returned non-zero for equal strings,
          because the tidyup routine failed to stop examining the differing
          words when it found matching zero bytes.
      Admin:
        Tested in softload C library, and in Lazarus ROM image.  strcmp()
          appears to be working per spec now.
      
      Version 5.31. Tagged as 'RISC_OSLib-5_31'
      534e1478
  26. 10 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      Removed spurious GET of rlib.s.asmdefs. · c2684576
      Stewart Brodie authored
      Detail:
        The file no longer exists as the UROM definition is passed on the command
          line now.
      Admin:
        5.29 wouldn't build because of the missing file - didn't catch it during
          testing for some reason :-(
      
      Version 5.30. Tagged as 'RISC_OSLib-5_30'
      c2684576
  27. 06 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      Fix for strcmp(). · 9d5bf66a
      Stewart Brodie authored
        Fix for RISC_OSLib res() function.
      Detail:
        Version 4.89 featured an improved strcmp() routine that didn't actually
          work properly (bug #4085).  The return values had the wrong sign if this
          optimised code was used and the string contained top-bit set chars.
        Removed that rlib.s.asmdefs hack as the comment in the makefile suggested.
          Nothing needs it any more as the assembler sources that require it now
          get via a -PD argument.
        res_ prefix function was still wrong as it failed to detect valid but wrong
          filenames, hence the "Make$Path not defined" errors in the latest tools
          release.
      Admin:
        Fixes Bugzilla bug #4085
        Should fix BaseSW's build problems too.
      
      Version 5.29. Tagged as 'RISC_OSLib-5_29'
      9d5bf66a
  28. 02 Mar, 2001 1 commit
    • Stewart Brodie's avatar
      Fixed fault in res library in RISC_OSLib. · 8b79f20e
      Stewart Brodie authored
        Module library builds of RISC_OSLib are exported during export_libs
      Detail:
        Ever since res_findname was altered to use <appname>:<resourcename> as
          the filename, the !C++ tool has been broken, because C++:Messages
          returns a different error to "not found" when you try to open it (it
          says it is an invalid filename).  This error is now caught explicitly
          and res_findname falls back to using <appname$Dir>.<resourcename>
          like it did before.
      Admin:
        Required by FrontEnd 1.21 or later.
        Required by !C++ (c++cmd-3_17 or later to function correctly)
      
      Version 5.28. Tagged as 'RISC_OSLib-5_28'
      8b79f20e
  29. 22 Feb, 2001 1 commit
    • Stewart Brodie's avatar
      fwrite performance improved significantly. · 0bb3e26a
      Stewart Brodie authored
        Another getenv() bug fixed.
      Detail:
        stdio.c contains a vastly improved implementation of fwrite.
        hostsys.h declares _terminate_getenv to remove build warnings.
        armsys.c contains fix to getenv() to stop Omni dying.
      Admin:
        Tested on desktop machine for over a week without incident, including
          several heavy fwrite users (WebServe, C compiler)
        fwrite change is documented in Doc/fwrite
        getenv() bug is Bugzilla bug #28
      
      Version 5.27. Tagged as 'RISC_OSLib-5_27'
      0bb3e26a
  30. 13 Dec, 2000 1 commit
    • Stewart Brodie's avatar
      BBE support added. · 0f6d9975
      Stewart Brodie authored
      Detail:
        The BBE export rules for this component are fairly complex.  The rom_link
          bbe rule is overridden in its entirety by clib.rom_link_v as the symbol
          definitions need to be generated and exported during the rom_link phase.
      Admin:
        Tested in BBE build; does not affect other builds.
      
      Version 5.26. Tagged as 'RISC_OSLib-5_26'
      0f6d9975
  31. 30 Nov, 2000 1 commit
    • Kevin Bracey's avatar
      Stubs were using some 26/32-bit switching macros, which is invalid for a... · 189a7be0
      Kevin Bracey authored
      Stubs were using some 26/32-bit switching macros, which is invalid for a component that has to work on all OS versions. Changed to use 26/32-bit neutral code. Stubs issued in first 32-bit library release were using 26-bit forms, but they should only go wrong on a 32-bit system in failure cases
      
      (such as the SharedCLibrary being unplugged).
      
      Version 5.25. Tagged as 'RISC_OSLib-5_25'
      189a7be0
  32. 22 Nov, 2000 1 commit
    • Simon Forrest's avatar
      * Merged South African resource changes made on Bethany branch. · c359fc77
      Simon Forrest authored
      Detail:
      
        * (As above.)  It would perhaps be a worthwhile change to use LocalRes
          type functionality in future to allow the UK resources to be chosen
          when no locale-specific resources exist.
      
      Admin:
      
        * Changes first applied to Bethany branch version.  Resources are
          copied from UK -> SAfrica.
      
      Version 5.24. Tagged as 'RISC_OSLib-5_24'
      c359fc77
  33. 21 Nov, 2000 1 commit
  34. 20 Nov, 2000 1 commit
    • Dan Ellis's avatar
      Improved abort handling · c31e0d58
      Dan Ellis authored
      Detail:
        * One check for 26-bit mode wan't being made, leading to the runtime reporting
          'Uncaught trap:' when a trap should have been catching the abort.  This
          prevented signal handlers from trapping some aborts.
        * When an abort was occuring in SVC mode, the stack wasn't being flattened,
          resulting in all sorts of nasty things when you tried to carry on from a
          signal handler (probably the main reason why you ever see 'No stack for trap
          handler'). SVC and undefined stacks are now flattened.  Further work should
          be done to restore the state of the OS after an abort, but this probably
          requires a new OS call to tidy itself up adequately.
      Admin:
        Built 26-bit versions of the library with new 32-bit compatible entry points and checked abort handling with both sharedclibrary and ansilib.
      
      Version 5.22. Tagged as 'RISC_OSLib-5_22'
      c31e0d58
  35. 08 Nov, 2000 1 commit
  36. 19 Oct, 2000 1 commit
    • Paul Skirrow's avatar
      Changed getenv to ensure it always allocates a buffer before calling · 9076880f
      Paul Skirrow authored
        OS_ReadVarVal.
      
      Detail:
        getenv calls OS_ReadVarVal to read a system variable into a buffer.
        If the buffer is not big enough it increases the size of the buffer by
        256 bytes and tries again.
        However, the first time it was called, it would have no buffer and
        would call OS_ReadVarVal with r2=-1. The PRM says this "may" return an error
        which should be ignored, but if it did not return an error then getenv
        would not allocate a buffer and the call would fail.
        This change allocates a 256 byte buffer before OS_ReadVarVal is called.
      
      Admin:
        Untested.
      
      Version 5.20. Tagged as 'RISC_OSLib-5_20'
      9076880f
  37. 17 Oct, 2000 1 commit
  38. 16 Oct, 2000 1 commit
    • Stewart Brodie's avatar
      Fixed bug in _swi/_swix code. · e6f4dbc1
      Stewart Brodie authored
      Detail:
        This code would only work in 26-bit modes, since it stored the output
          flags using STR pc, [sp, #4*4]!.  When {CONFIG} is 32, it stores the
          CPSR instead.
      Admin:
        Tested in 32-bit Lazarus build - this fixes the RCMMDriver stiffing
          (because it sits with interrupts off waiting for the C flag to be
          set on exit from an OS_Byte call it calls through _swix)
      
      Version 5.19. Tagged as 'RISC_OSLib-5_19'
      e6f4dbc1
  39. 09 Oct, 2000 1 commit
    • Stewart Brodie's avatar
      Fixed _kernel_setenv. · d1f38470
      Stewart Brodie authored
      Detail:
        _kernel_setenv(varname, NULL) should delete the variables.  It now does.
      Admin:
        Tested in module.
      
      Version 5.18. Tagged as 'RISC_OSLib-5_18'
      d1f38470
  40. 03 Oct, 2000 1 commit