[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Subversion 1.6.1 broken on AIX compiling with xlc

From: Jens Rehsack <rehsack_at_googlemail.com>
Date: Thu, 30 Apr 2009 18:01:35 +0000

Hi all,

I assist Greg updating the subversion-package for PkgSrc and tried out
whether it builds fine on AIX - it doesn't, but the problem was really small.

> cc -I/opt/pkgsrc/include -I/usr/include -I/opt/pkgsrc/include/apr-1
> -U__STR__ -D_THREAD_SAFE -D_USE_IRS -q64 -qarch=ppc64 -O2 -qstrict
> -qcpluscmt -qmaxmem=-1 -qkeyword=inline -I/opt/pkgsrc/include -ma
> -I/usr/include -I/opt/pkgsrc/include/apr-1 -qHALT=E
> -I./subversion/include -I./subversion -I/opt/pkgsrc/include/apr-1
> -I/opt/pkgsrc/include/apr-1 -I/opt/pkgsrc/include
> -I/opt/pkgsrc/include/neon -o subversion/svnserve/serve.o -c
> subversion/svnserve/serve.c
> "subversion/svnserve/serve.c", line 1981.21: 1506-343 (S) Redeclaration of
> stat differs from previous declaration on line 320 of
> "/usr/include/sys/stat.h".
> "subversion/svnserve/serve.c", line 1981.21: 1506-050 (I) Return type
> "struct svn_error_t*" in redeclaration is not compatible with the previous
> return type "int".
> "subversion/svnserve/serve.c", line 1981.21: 1506-376 (I) Redeclaration of
> stat has a different number of fixed parameters than the previous
> declaration.
> "subversion/svnserve/serve.c", line 1981.21: 1506-377 (I) The type "struct
> svn_ra_svn_conn_st*" of parameter 1 differs from the previous type "const
> char* restrict".

It seems that the xlc doesn't like the redefinition of the stat() function.
My solution was easy - I renamed the stat() function to stat_cmd() - see
attached patch.

Best regards,
Jens

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1998824

$NetBSD$

--- subversion/svnserve/serve.c.orig 2009-04-30 15:52:39.000000000 +0200
+++ subversion/svnserve/serve.c 2009-04-30 15:56:56.000000000 +0200
@@ -1978,7 +1978,7 @@
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *stat(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
+static svn_error_t *stat_cmd(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
                          apr_array_header_t *params, void *baton)
 {
   server_baton_t *b = baton;
@@ -2735,7 +2735,7 @@
   { "get-mergeinfo", get_mergeinfo },
   { "log", log_cmd },
   { "check-path", check_path },
- { "stat", stat },
+ { "stat", stat_cmd },
   { "get-locations", get_locations },
   { "get-location-segments", get_location_segments },
   { "get-file-revs", get_file_revs },
Received on 2009-05-01 17:55:06 CEST

This is an archived mail posted to the Subversion Dev mailing list.