bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-indent] Windows


From: Peter Harris
Subject: [Bug-indent] Windows
Date: Thu, 22 May 2003 17:38:27 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

I could not build indent-2.2.9 on Windows out-of-the-box.

The attached diff makes it work for me.

Peter Harris
diff -cr indent-2.2.9\src\comments.c indent-2.2.9-pjh\src\comments.c
*** indent-2.2.9\src\comments.c Sun Aug 04 13:08:41 2002
--- indent-2.2.9-pjh\src\comments.c     Wed Feb 12 15:58:14 2003
***************
*** 20,25 ****
--- 20,26 ----
  #include "comments.h"
  #include "globs.h"
  #include "parse.h"
+ #include "output.h"
  
  RCSTAG_CC ("$Id: comments.c,v 1.33 2002/08/04 17:08:41 david Exp $");
  
diff -cr indent-2.2.9\src\indent.c indent-2.2.9-pjh\src\indent.c
*** indent-2.2.9\src\indent.c   Mon Oct 28 15:00:56 2002
--- indent-2.2.9-pjh\src\indent.c       Wed Feb 12 17:19:10 2003
***************
*** 2536,2542 ****
           * we reach eof */
  
          BOOLEAN is_procname_definition;
!         bb_code_ty can_break;
  
          if (type_code != newline)
          {
--- 2536,2542 ----
           * we reach eof */
  
          BOOLEAN is_procname_definition;
!         bb_code_ty can_break = 0;
  
          if (type_code != newline)
          {
***************
*** 3057,3072 ****
      int     argc,
      char ** argv)
  {
-     int i;
      char *profile_pathname = 0;
      BOOLEAN using_stdin = false;
      exit_values_ty exit_status;
  
  #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
      setlocale (LC_MESSAGES, "");
- #endif
      bindtextdomain (PACKAGE, LOCALEDIR);
      textdomain (PACKAGE);
  
  #if defined (_WIN32) && !defined (__CYGWIN__)
      /* wildcard expansion of commandline arguments, see wildexp.c */
--- 3057,3071 ----
      int     argc,
      char ** argv)
  {
      char *profile_pathname = 0;
      BOOLEAN using_stdin = false;
      exit_values_ty exit_status;
  
  #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
      setlocale (LC_MESSAGES, "");
      bindtextdomain (PACKAGE, LOCALEDIR);
      textdomain (PACKAGE);
+ #endif
  
  #if defined (_WIN32) && !defined (__CYGWIN__)
      /* wildcard expansion of commandline arguments, see wildexp.c */
diff -cr indent-2.2.9\src\indent.h indent-2.2.9-pjh\src\indent.h
*** indent-2.2.9\src\indent.h   Sun Nov 10 16:02:48 2002
--- indent-2.2.9-pjh\src\indent.h       Wed Feb 12 14:57:34 2003
***************
*** 29,37 ****
  
  #include "sys.h"
  RCSTAG_H (indent, "$Id: indent.h,v 1.37 2002/11/10 21:02:48 david Exp $");
! #include <config.h>
  
! #include <libgettext.h>
  #ifdef ENABLE_NLS
  #define _(X) gettext(X)
  #else
--- 29,37 ----
  
  #include "sys.h"
  RCSTAG_H (indent, "$Id: indent.h,v 1.37 2002/11/10 21:02:48 david Exp $");
! #include "config.h"
  
! #include "libgettext.h"
  #ifdef ENABLE_NLS
  #define _(X) gettext(X)
  #else
diff -cr indent-2.2.9\src\io.h indent-2.2.9-pjh\src\io.h
*** indent-2.2.9\src\io.h       Sun Aug 04 13:08:41 2002
--- indent-2.2.9-pjh\src\io.h   Wed Feb 12 14:59:01 2003
***************
*** 20,25 ****
--- 20,28 ----
  
  RCSTAG_H (io, "$Id: io.h,v 1.12 2002/08/04 17:08:41 david Exp $");
  #include <sys/stat.h>
+ #ifdef _WIN32
+ #include <io.h>
+ #endif
  
  typedef struct file_buffer
  {
diff -cr indent-2.2.9\src\output.c indent-2.2.9-pjh\src\output.c
*** indent-2.2.9\src\output.c   Thu Dec 12 12:36:49 2002
--- indent-2.2.9-pjh\src\output.c       Wed Feb 12 15:27:27 2003
***************
*** 12,19 ****
--- 12,22 ----
   */
  
  #include <stdio.h>
+ #include <stdlib.h>
  #include <sys/types.h>
+ #ifndef _WIN32
  #include <utime.h>
+ #endif
  #include <sys/stat.h>
  
  #include "indent.h"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]