Jim Meyering wrote:
It's saying that with its default settings, the post-cpp-expansion of
this code is too large:
[snip]

I know what the problem is; as I was saying, I didn't find a way to get past this type of error except "don't do that", i.e. break down what cpp is seeing into manageable bites.

How about the attached work-around (obviously '#if 1' should be changed to something more like '#if using-the-hp-ux-cc-compiler')?

(Build succeeds with this, using HP-UX's cc. I'll post the test results when the suite is done.)

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
"Two IIRC's must make a right" -- Larry Hall (paraphrased)
--- ../../sun4_solaris/coreutils-7.1.63-8e6a6/src/dd.c  2009-03-18 
10:49:51.000000000 -0800
+++ src/dd.c    2009-03-19 08:27:23.242175000 -0800
@@ -265,6 +265,24 @@
 
 enum
   {
+#if 1
+    /* Use a value that is larger than that of any other O_ symbol.  */
+    /* HP-UX CC has a limit on macro size; must work around this */
+    O_DO_NOT_USE_THIS_1 = (MAX (O_APPEND,
+                          MAX (O_BINARY,
+                          MAX (O_CIO,
+                          MAX (O_DIRECT,
+                          MAX (O_DIRECTORY,
+                          MAX (O_DSYNC, 0))))))),
+    O_DO_NOT_USE_THIS_2 = (MAX (O_NOATIME,
+                          MAX (O_NOCTTY,
+                          MAX (O_NOFOLLOW,
+                          MAX (O_NOLINKS,
+                          MAX (O_NONBLOCK,
+                          MAX (O_SYNC,
+                          MAX (O_TEXT, 0)))))))),
+    O_FULLBLOCK = ((MAX (O_DO_NOT_USE_THIS_1, O_DO_NOT_USE_THIS_2)) << 1)
+#else
     /* Use a value that is larger than that of any other O_ symbol.  */
     O_FULLBLOCK = ((MAX (O_APPEND,
                    MAX (O_BINARY,
@@ -279,6 +297,7 @@
                    MAX (O_NONBLOCK,
                    MAX (O_SYNC,
                    MAX (O_TEXT, 0)))))))))))))) << 1)
+#endif
   };
 
 /* Ensure that we didn't shift it off the end.  */
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to