1. 09 10月, 2009 2 次提交
    • R
      Fix the exit code of MSVC build scripts on cygwin · b5d18b8e
      Ramsay Jones 提交于
      During an MSVC build on cygwin, the make program did not notice
      when the compiler or linker exited with an error. This was caused
      by the scripts exiting with the value returned by system() directly.
      
      On POSIX-like systems, such as cygwin, the return value of system()
      has the exit code of the executed command encoded in the first byte
      (ie the value is shifted up by 8 bits). This allows the bottom
      7 bits to contain the signal number of a terminated process, while
      the eighth bit indicates whether a core-dump was produced. (A value
      of -1 indicates that the command failed to execute.)
      
      The make program, however, expects the exit code to be encoded in the
      bottom byte. Futhermore, it apparently masks off and ignores anything
      in the upper bytes.
      
      However, these scripts are (naturally) intended to be used on the
      windows platform, where we can not assume POSIX-like semantics from
      a perl implementation (eg ActiveState). So, in general, we can not
      assume that shifting the return value right by eight will get us
      the exit code.
      
      In order to improve portability, we assume that a zero return from
      system() indicates success, whereas anything else indicates failure.
      Since we don't need to know the exact exit code from the compiler
      or linker, we simply exit with 0 (success) or 1 (failure).
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b5d18b8e
    • R
      Fix MSVC build on cygwin · f2d50d93
      Ramsay Jones 提交于
      In the MSVC section of the Makefile, BASIC_CFLAGS is set to a
      value which contains the string "-DWIN32-D_CONSOLE". This results
      in a (single) malformed -Define being passed to the compiler.
      At least on my cygwin installation, the msvc compiler seems to
      ignore this parameter, without issuing an error or warning, and
      results in the WIN32 and _CONSOLE macros being undefined. This
      breaks the build.
      
      In order to fix the build, we simply insert a space between the
      two -Define parameters, "-DWIN32" and "-D_CONSOLE", as originally
      intended.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f2d50d93
  2. 19 9月, 2009 17 次提交
  3. 17 9月, 2009 7 次提交
  4. 15 9月, 2009 3 次提交
  5. 14 9月, 2009 10 次提交
  6. 13 9月, 2009 1 次提交