bug-findutils
[Top][All Lists]
Advanced

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

Re: findutils-4.2.25: Compile problem under AIX 5.1 (gcc 4.0.0)


From: Jens Schleusener
Subject: Re: findutils-4.2.25: Compile problem under AIX 5.1 (gcc 4.0.0)
Date: Mon, 5 Sep 2005 20:23:46 +0200 (DFT)

On Sun, 4 Sep 2005, James Youngman wrote:

On Sun, Sep 04, 2005 at 06:52:15PM +0100, James Youngman wrote:

The problem is fairly easily worked around by
[...]

More explicitly, you could apply this patch:-

Index: find/defs.h
===================================================================
RCS file: /cvsroot/findutils/findutils/find/defs.h,v
retrieving revision 1.45
diff -u -r1.45 defs.h
--- find/defs.h 30 Aug 2005 07:44:11 -0000      1.45
+++ find/defs.h 4 Sep 2005 17:56:02 -0000
@@ -429,7 +429,7 @@
boolean pred_and PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_anewer PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_atime PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
-boolean pred_close PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
+boolean pred_closeparen PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_cmin PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_cnewer PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_comma PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
@@ -462,7 +462,7 @@
boolean pred_nouser PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_ok PARAMS((char *pathname, struct stat *stat_buf, struct predicate 
*pred_ptr));
boolean pred_okdir PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
-boolean pred_open PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
+boolean pred_openparen PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_or PARAMS((char *pathname, struct stat *stat_buf, struct predicate 
*pred_ptr));
boolean pred_path PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
boolean pred_perm PARAMS((char *pathname, struct stat *stat_buf, struct 
predicate *pred_ptr));
Index: find/find.c
===================================================================
RCS file: /cvsroot/findutils/findutils/find/find.c,v
retrieving revision 1.93
diff -u -r1.93 find.c
--- find/find.c 30 Aug 2005 07:44:11 -0000      1.93
+++ find/find.c 4 Sep 2005 17:56:03 -0000
@@ -527,7 +527,7 @@
  assert(entry_close != NULL);
  assert(entry_print != NULL);

-  parse_open (entry_open, argv, &argc);
+  parse_openparen (entry_open, argv, &argc);
  parse_begin_user_args(argv, argc, last_pred, predicates);
  pred_sanity_check(last_pred);

@@ -583,7 +583,7 @@
  else
    {
      /* `( user-supplied-expression ) -print'. */
-      parse_close (entry_close, argv, &argc);
+      parse_closeparen (entry_close, argv, &argc);
      pred_sanity_check(last_pred);
      parse_print (entry_print, argv, &argc);
      pred_sanity_check(last_pred);
Index: find/parser.c
===================================================================
RCS file: /cvsroot/findutils/findutils/find/parser.c,v
retrieving revision 1.78
diff -u -r1.78 parser.c
--- find/parser.c       31 Jul 2005 21:12:43 -0000      1.78
+++ find/parser.c       4 Sep 2005 17:56:03 -0000
@@ -151,8 +151,8 @@


boolean parse_print             PARAMS((const struct parser_table*, char 
*argv[], int *arg_ptr));
-boolean parse_open              PARAMS((const struct parser_table* entry, char 
*argv[], int *arg_ptr));
-boolean parse_close             PARAMS((const struct parser_table* entry, char 
*argv[], int *arg_ptr));
+boolean parse_openparen              PARAMS((const struct parser_table* entry, 
char *argv[], int *arg_ptr));
+boolean parse_closeparen             PARAMS((const struct parser_table* entry, 
char *argv[], int *arg_ptr));



@@ -206,8 +206,8 @@
{
  PARSE_PUNCTUATION("!",                     negate),
  PARSE_PUNCTUATION("not",                   negate),      /* GNU */
-  PARSE_PUNCTUATION("(",                     open),
-  PARSE_PUNCTUATION(")",                     close),
+  PARSE_PUNCTUATION("(",                     openparen),
+  PARSE_PUNCTUATION(")",                     closeparen),
  PARSE_PUNCTUATION(",",                     comma),       /* GNU */
  PARSE_PUNCTUATION("a",                     and),
  PARSE_TEST       ("amin",                  amin),        /* GNU */
@@ -474,7 +474,7 @@
}

boolean
-parse_close (const struct parser_table* entry, char **argv, int *arg_ptr)
+parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
{
  struct predicate *our_pred;

@@ -482,9 +482,9 @@
  (void) arg_ptr;

  our_pred = get_new_pred (entry);
-  our_pred->pred_func = pred_close;
+  our_pred->pred_func = pred_closeparen;
#ifdef  DEBUG
-  our_pred->p_name = find_pred_name (pred_close);
+  our_pred->p_name = find_pred_name (pred_closeparen);
#endif  /* DEBUG */
  our_pred->p_type = CLOSE_PAREN;
  our_pred->p_prec = NO_PREC;
@@ -1208,7 +1208,7 @@
}

boolean
-parse_open (const struct parser_table* entry, char **argv, int *arg_ptr)
+parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
{
  struct predicate *our_pred;

@@ -1216,9 +1216,9 @@
  (void) arg_ptr;

  our_pred = get_new_pred_chk_op (entry);
-  our_pred->pred_func = pred_open;
+  our_pred->pred_func = pred_openparen;
#ifdef  DEBUG
-  our_pred->p_name = find_pred_name (pred_open);
+  our_pred->p_name = find_pred_name (pred_openparen);
#endif  /* DEBUG */
  our_pred->p_type = OPEN_PAREN;
  our_pred->p_prec = NO_PREC;
Index: find/pred.c
===================================================================
RCS file: /cvsroot/findutils/findutils/find/pred.c,v
retrieving revision 1.66
diff -u -r1.66 pred.c
--- find/pred.c 30 Aug 2005 07:44:11 -0000      1.66
+++ find/pred.c 4 Sep 2005 17:56:04 -0000
@@ -167,7 +167,7 @@
  {pred_and, "and     "},
  {pred_anewer, "anewer  "},
  {pred_atime, "atime   "},
-  {pred_close, ")       "},
+  {pred_closeparen, ")       "},
  {pred_amin, "cmin    "},
  {pred_cnewer, "cnewer  "},
  {pred_comma, ",       "},
@@ -199,7 +199,7 @@
  {pred_nouser, "nouser  "},
  {pred_ok, "ok      "},
  {pred_okdir, "okdir   "},
-  {pred_open, "(       "},
+  {pred_openparen, "(       "},
  {pred_or, "or      "},
  {pred_path, "path    "},
  {pred_perm, "perm    "},
@@ -334,7 +334,7 @@
}

boolean
-pred_close (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+pred_closeparen (char *pathname, struct stat *stat_buf, struct predicate 
*pred_ptr)
{
  (void) &pathname;
  (void) &stat_buf;
@@ -1187,7 +1187,7 @@
}

boolean
-pred_open (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
+pred_openparen (char *pathname, struct stat *stat_buf, struct predicate 
*pred_ptr)
{
  (void) pathname;
  (void) stat_buf;


Thank you, that patch works for me.

Til now I haven't found out who did the replacement "open" -> "open64". But most of the installed freeware on that AIX system is self-compiled by me so I may have done something wrong. But otherwise I have no problems installing many packages with the exception of the "GNU MP 2"-package where I had explicitely to force the use of the 32-bit ABI.

Oh, just I found in /usr/include/fcntl.h the lines

 /* Redefine open and creat for large file enabled programming environment. */
 #ifdef _LARGE_FILES
 #define open   open64
 #define  creat creat64
 #endif

just a line as you suspected in your previous mail.

So I added the configure-option "--disable-largefile" and the unpatched version compiles also well.

Thank you for your support

Jens

--
Dr. Jens Schleusener            T-Systems Solutions for Research GmbH
Tel: +49 551 709-2493           Bunsenstr.10
Fax: +49 551 709-2169           D-37073 Goettingen
address@hidden  http://www.t-systems.com/




reply via email to

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