You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Chris Scharver <sc...@evl.uic.edu> on 2004/09/07 16:44:41 UTC

[PATCH] fix for compiling 1.1.0rc2 on IRIX 6.5

The IRIX cc compiler generates errors compiling Subversion 1.1.0rc2 on 
IRIX 6.5. Redefining the character arrays as pointers resolves these 
errors and allows Subversion to properly build with MIPSpro cc 7.30 on 
IRIX 6.5.9 without BDB. It's an older system version, but numerous 
reasons have prevented upgrades. Therefore, here's the simple fix that 
I used to get my repository up and running.

<http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=17145>

* subversion/clients/cmdline/cl.h:
   (svn_cl__help_header, svn_cl__help_footer ): Changed declarations 
from const char[] to const char*.
* subversion/clients/cmdline/help-cmd.c:
   (svn_cl__help_header, svn_cl__help_footer ): Changed definitions from 
const char[] to const char*.

diff -ru ./subversion/clients/cmdline/cl.h 
../../subversion-1.1.0-rc2/subversion/clients/cmdline/cl.h
--- ./subversion/clients/cmdline/cl.h   Wed May 19 16:32:54 2004
+++ ../../subversion-1.1.0-rc2/subversion/clients/cmdline/cl.h  Thu Sep 
  2 13:50:49 2004
@@ -180,8 +180,8 @@
  extern const apr_getopt_option_t svn_cl__options[];

  /* Header and footer text for svn_opt_print_generic_help. */
-extern const char svn_cl__help_header[];
-extern const char svn_cl__help_footer[];
+extern const char* svn_cl__help_header;
+extern const char* svn_cl__help_footer;



  /* Our cancellation callback. */
diff -ru ./subversion/clients/cmdline/help-cmd.c 
../../subversion-1.1.0-rc2/subversion/clients/cmdline/help-cmd.c
--- ./subversion/clients/cmdline/help-cmd.c     Mon Apr 19 15:25:32 2004
+++ ../../subversion-1.1.0-rc2/subversion/clients/cmdline/help-cmd.c    
Thu Sep  2 13:51:11 2004
@@ -31,7 +31,7 @@

  #include "svn_private_config.h"

-const char svn_cl__help_header[] =
+const char* svn_cl__help_header =
      N_("usage: svn <subcommand> [options] [args]\n"
         "Type \"svn help <subcommand>\" for help on a specific 
subcommand.\n"
         "\n"
@@ -42,7 +42,7 @@
         "\n"
         "Available subcommands:\n");

-const char svn_cl__help_footer[] =
+const char* svn_cl__help_footer =
      N_("Subversion is a tool for version control.\n"
         "For additional information, see 
http://subversion.tigris.org/\n"
         "\n");

-- 
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago



--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002   FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] fix for compiling 1.1.0rc2 on IRIX 6.5

Posted by Michael W Thelen <th...@cs.utah.edu>.
Chris Scharver <sc...@evl.uic.edu> wrote:
> The IRIX cc compiler generates errors compiling Subversion 1.1.0rc2 on
> IRIX 6.5. Redefining the character arrays as pointers resolves these
> errors and allows Subversion to properly build with MIPSpro cc 7.30 on
> IRIX 6.5.9 without BDB. It's an older system version, but numerous
> reasons have prevented upgrades. Therefore, here's the simple fix that I
> used to get my repository up and running.

Thank you for the patch.  I've filed it as issue 2082:
http://subversion.tigris.org/issues/show_bug.cgi?id=2082

-- Mike

-- 
Michael W Thelen
thelenm@cs.utah.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] fix for compiling 1.1.0rc2 on IRIX 6.5

Posted by Ben Reser <be...@reser.org>.
On Tue, Sep 07, 2004 at 11:44:41AM -0500, Chris Scharver wrote:
> The IRIX cc compiler generates errors compiling Subversion 1.1.0rc2 on 
> IRIX 6.5. Redefining the character arrays as pointers resolves these 
> errors and allows Subversion to properly build with MIPSpro cc 7.30 on 
> IRIX 6.5.9 without BDB. It's an older system version, but numerous 
> reasons have prevented upgrades. Therefore, here's the simple fix that 
> I used to get my repository up and running.

Chris, 

Thanks for the patch.  While your change resolved the problem.  It
didn't really find the root cause.  const char foo[] = "foo" is valid.
N_() is a no-op macro intended to tell gettext that the string should be
marked for translation.  However we had it defined as:
#define N_(x) (x)

For whatever reason your compiler rejects:
char foo[] = ("foo");

Our solution is to use:
#define N_(x) x

This was changed in r11486.  The fix should be in 1.1.1.  If you'd like
to try it now to see if it works you can get the patch by doing:
svn diff -r11485:11486 http://svn.collab.net/repos/svn/trunk

After patching your source you will need to run autogen.sh and
configure.

I'm closing Issue #2082 as a result.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org