1. 13 Oct, 2009 1 commit
    • Disable some msvc "deprecated function" warnings again · 5cae6c25
      In addition to removing the inline #define, commit 209849a4 also
      removed a #pragma to disable msvc deprecated function warnings.
      Without this #pragma, msvc currently issues 19 warnings related
      to "deprecated insecure c-library functions", such as strcpy()
      and 22 warnings related to "deprecated POSIX function names",
      such as open().
      
      In order to supress these warnings, re-instate the #pragma.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
  2. 16 Jun, 2009 2 commits
  3. 15 Jun, 2009 3 commits
    • win32: Add an fsync() implementation for windows · c79dded3
      For information on FlushFileBuffers(), see the msdn document
      at msdn.microsoft.com/en-us/library/aa364439(VS.85).aspx
      
      Note that Windows 2000 is shown as the minimum windows version
      to support FlushFileBuffers(), so if we wish to support Win9X
      and NT4, we will need to add code to dynamically check if
      kernel32.dll contains the function.
      
      The only error return mentioned in the msdn document is
      ERROR_INVALID_HANDLE, which is returned if the file/device
      (eg console) is not buffered. The fsync(2) manpage says that
      EINVAL is returned in errno, if "fd is bound to a special
      file which does not support synchronization".
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • win32: Add support for the MS Visual C/C++ compiler · 8a086f87
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
    • Correct the spelling of the FLEX_ARRAY macro · 2bf93fa1
      When setting the default value, the macro name was specified
      as GIT_FLEX_ARRAY, which is inconsistent with it's earlier
      usage in the file. This caused a compilation error, using the
      MS Visual C/C++ compiler, when compiling the git_packlist
      struct definition in src/odb.c.
      
      In addition to changing the spelling of the FLEX_ARRAY macro
      to GIT_FLEX_ARRAY, including it's use in src/odb.c, we also
      rename the TYPEOF macro to GIT_TYPEOF.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
  4. 05 Jun, 2009 11 commits
  5. 30 Mar, 2009 3 commits
  6. 20 Mar, 2009 2 commits
  7. 18 Mar, 2009 7 commits
  8. 11 Feb, 2009 5 commits
    • Correct some comments in readloose tests · 04c9c16e
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Add the git_odb_exists() object query function · 82324ac1
      This function determines if the given object can be found
      in the object database. At present, only the local object
      database is searched.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Rearrange some code to improve clarity · e9f5e877
      In particular, the test for z-stream input completion
      (zs.avail_in != 0) logically belongs with the test for
      the Z_STREAM_END stream status. This is also consistent
      with the identical check in finish_inflate().
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Check for error returns from inflateInit() · 236e7579
      At present, it is sufficient to ensure that an error return
      from inflateInit() is not ignored. Most error returns, like
      Z_VERSION_ERROR and Z_STREAM_ERROR, indicate programming or
      build errors. These errors could, perhaps, be handled with
      simple asserts. However, for a Z_MEM_ERROR, we may want to
      perform some further error handling in the future.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
    • Fix a potential memory leak · c94eb4aa
      In particular, neglecting to call inflateEnd() along various
      codepaths in the inflate_tail() routine, would result in the
      failure to release zlib internal state.
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Ramsay Jones committed
  9. 01 Feb, 2009 4 commits
  10. 28 Jan, 2009 2 commits