1. 12 Aug, 2002 1 commit
    • Ben Avison's avatar
      How did we not notice this before? · 45c70245
      Ben Avison authored
        Fixed a stack imbalance in _memcpy that's been there since 32-bitting.
        Not tested yet.
      Version 5.43. Tagged as 'RISC_OSLib-5_43'
  2. 23 Jul, 2002 1 commit
  3. 22 May, 2002 2 commits
    • 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'
    • Ben Avison's avatar
      Created cleanroom implementation of 64-bit integer support for licencing... · 280c51dc
      Ben Avison authored
      Created cleanroom implementation of 64-bit integer support for licencing reasons. Tested fairly thoroughly (in fact, this testing showed up a bug in the old code which unbalanced the stack for 50% of cases where you divided a negative long long by 10). Hopefully should work faster than the old code too!
      Reapplied all relevant old tags.
      Real commit date 2008-03-18.
  4. 12 Apr, 2002 1 commit
  5. 11 Apr, 2002 2 commits
  6. 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'
  7. 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()
        * hypot(), hypotf(), fabsf(), fdim(), fdimf(), fmax(), fmaxf(), fmin(),
        * 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
      Requires cc 5.41 or later, both to build, and to make use of some of the extra
      Version 5.37. Tagged as 'RISC_OSLib-5_37'
  8. 22 Feb, 2002 1 commit
  9. 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'
  10. 11 Oct, 2001 1 commit
  11. 23 Aug, 2001 3 commits
  12. 10 May, 2001 1 commit
    • Stewart Brodie's avatar
      Fix for strxfrm() · 8159da18
      Stewart Brodie authored
        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!
        Reported by <mailto:ian.foster@gps.tandb.co.uk>
        Fixes Bugzilla bug #4375
      Version 5.33. Tagged as 'RISC_OSLib-5_33'
  13. 17 Apr, 2001 1 commit
  14. 11 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      strcmp() fix was broken. · 534e1478
      Stewart Brodie authored
        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.
        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'
  15. 10 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      Removed spurious GET of rlib.s.asmdefs. · c2684576
      Stewart Brodie authored
        The file no longer exists as the UROM definition is passed on the command
          line now.
        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'
  16. 06 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      Fix for strcmp(). · 9d5bf66a
      Stewart Brodie authored
        Fix for RISC_OSLib res() function.
        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
        Fixes Bugzilla bug #4085
        Should fix BaseSW's build problems too.
      Version 5.29. Tagged as 'RISC_OSLib-5_29'
  17. 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
        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.
        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'
  18. 22 Feb, 2001 1 commit
    • Stewart Brodie's avatar
      fwrite performance improved significantly. · 0bb3e26a
      Stewart Brodie authored
        Another getenv() bug fixed.
        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.
        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'
  19. 13 Dec, 2000 1 commit
    • Stewart Brodie's avatar
      BBE support added. · 0f6d9975
      Stewart Brodie authored
        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.
        Tested in BBE build; does not affect other builds.
      Version 5.26. Tagged as 'RISC_OSLib-5_26'
  20. 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'
  21. 22 Nov, 2000 1 commit
    • Simon Forrest's avatar
      * Merged South African resource changes made on Bethany branch. · c359fc77
      Simon Forrest authored
        * (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.
        * Changes first applied to Bethany branch version.  Resources are
          copied from UK -> SAfrica.
      Version 5.24. Tagged as 'RISC_OSLib-5_24'
  22. 21 Nov, 2000 1 commit
  23. 20 Nov, 2000 1 commit
    • Dan Ellis's avatar
      Improved abort handling · c31e0d58
      Dan Ellis authored
        * 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.
        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'
  24. 08 Nov, 2000 1 commit
  25. 19 Oct, 2000 1 commit
    • Paul Skirrow's avatar
      Changed getenv to ensure it always allocates a buffer before calling · 9076880f
      Paul Skirrow authored
        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.
      Version 5.20. Tagged as 'RISC_OSLib-5_20'
  26. 17 Oct, 2000 1 commit
  27. 16 Oct, 2000 1 commit
    • Stewart Brodie's avatar
      Fixed bug in _swi/_swix code. · e6f4dbc1
      Stewart Brodie authored
        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.
        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'
  28. 09 Oct, 2000 1 commit
    • Stewart Brodie's avatar
      Fixed _kernel_setenv. · d1f38470
      Stewart Brodie authored
        _kernel_setenv(varname, NULL) should delete the variables.  It now does.
        Tested in module.
      Version 5.18. Tagged as 'RISC_OSLib-5_18'
  29. 03 Oct, 2000 1 commit
  30. 02 Oct, 2000 2 commits
    • Stewart Brodie's avatar
      Uses SYMDEFS files to avoid xtentries(app) and symgen. · 5810d878
      Stewart Brodie authored
        Fixed bug in getenv() relating to macro and numeric system variables.
        Uses SYMDEFS file to avoid messing around with generating little text
          files, generating assembler source, assembling it etc.  abssym et al
          are construct as symbol definition template files and then updated
          directly by the linker ready for export.  The linker can use these
          files directly without needing them to be assembled into AOF format.
        Fixed getenv so that it can read macro and numeric variables.  With these
          variable types, R2 does not equal -length of the variable value, so
          trying to obtain a variable with a larger value than any previously
          read variable would fail.  This is now fixed.
        This module will refuse to build without link 5.19 or later.
        Requires Library 0.54 or later.
        This component will not build with Library 0.53 or earlier.
      Version 5.16. Tagged as 'RISC_OSLib-5_16'
    • Kevin Bracey's avatar
      * Trailing garbage no longer appears after some perror() calls. · dddff229
      Kevin Bracey authored
      * Correction to static base location in modulewrap - was affecting some
        DSL 4000 video software.
      Version 5.15. Tagged as 'RISC_OSLib-5_15'
  31. 14 Sep, 2000 1 commit
    • Stewart Brodie's avatar
      Fixed minor printf bug. · 8b52f983
      Stewart Brodie authored
        %#x shows a leading 0x (and %#X leads with 0X) only when the value
          to be displayed is NOT zero.
        Cross-verified against: C89 standard; C9X standard; gcc 2.95 implementation.
      Version 5.14. Tagged as 'RISC_OSLib-5_14'
  32. 17 Aug, 2000 1 commit
    • Stewart Brodie's avatar
      Major fix to Makefile. · 8e631acb
      Stewart Brodie authored
        Due to a dependency cockup, the C library wasn't being relinked properly
          during rom_link, so all the symbols exported in abssym files pointed
          to the locations the previous build was linked at.  This is now fixed
          by the addition of a new pseudo-target.
        Tested clean and incremental build and verified the abssym file.
        Checked the build log to ensure relinking was occurring.
        Versions 5.11 and 5.12 of this component are fundamentally flawed.
      Version 5.13. Tagged as 'RISC_OSLib-5_13'
  33. 15 Aug, 2000 1 commit
  34. 11 Aug, 2000 1 commit
    • Stewart Brodie's avatar
      Added cut-down target which excludes RISC_OSLib. · ca39be4e
      Stewart Brodie authored
        This component now supports multiple TARGETs being passed in:
          Pass in CLib for a minimal C library excluding RISC_OSLib.
          Pass in RISC_OSLib to continue to build the full thing.
        BuildSys will be modified to make SharedCLibrary build ONLY
          the minimal library - this may mean that products that are
          to be updated may have to alter their components file to
          take the new SharedRISC_OSLib component instead of the
          SharedCLibrary target.
        syms.A_Entries is now automatically generated from C_Entries
          because this is the easiest way to generate the file.  If
          extra symbols are added to C_Entries, they will need to be
          removed by the egrep command which strips out _swi and _swix.
        Makefile tidied to be more careful about ${COMPONENT} and ${TARGET}
        clean_all rule improved to really clean things properly.
        Tested in STB400-2M build and on desktop build.
        Requires BuildSys-2_41 or later.
      Version 5.11. Tagged as 'RISC_OSLib-5_11'
  35. 03 Jul, 2000 1 commit