*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Saturday February 11, 2017 at 04:09:01 PM EST
+ * It has been AutoGen-ed Saturday February 25, 2017 at 03:25:44 PM EST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat 11 Feb 2017 16:09:01 EST
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat 25 Feb 2017 15:25:44 EST
*
* You must regenerate it. Use the ./genfixes script.
*
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 247 fixup descriptions.
+ * This file contains 248 fixup descriptions.
*
* See README for more information.
*
#endif",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Hpux11_Pthread_Pointer fix
+ */
+tSCC zHpux11_Pthread_PointerName[] =
+ "hpux11_pthread_pointer";
+
+/*
+ * File name selection pattern
+ */
+tSCC zHpux11_Pthread_PointerList[] =
+ "sys/pthread.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzHpux11_Pthread_PointerMachs[] = {
+ "*-hp-hpux11.[0-3]*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zHpux11_Pthread_PointerSelect0[] =
+ "(void[ \t]*\\*)(m|c|rw)(_ptr)";
+
+#define HPUX11_PTHREAD_POINTER_TEST_CT 1
+static tTestDesc aHpux11_Pthread_PointerTests[] = {
+ { TT_EGREP, zHpux11_Pthread_PointerSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Hpux11_Pthread_Pointer
+ */
+static const char* apzHpux11_Pthread_PointerPatch[] = {
+ "format",
+ "long\t%2%3",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux11_Pthread_Const fix
* content selection pattern - do fix if pattern found
*/
tSCC zHpux11_Pthread_ConstSelect0[] =
- "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
+ "^(#define[ \t]+__POINTER_SET[ \t0,]*)(.*\\))";
#define HPUX11_PTHREAD_CONST_TEST_CT 1
static tTestDesc aHpux11_Pthread_ConstTests[] = {
*/
static const char* apzHpux11_Pthread_ConstPatch[] = {
"format",
- "#define __POINTER_SET\t\t((void *) 1L)",
+ "%11",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* List of all fixes
*/
-#define REGEX_COUNT 284
+#define REGEX_COUNT 285
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 247
+#define FIX_COUNT 248
/*
* Enumerate the fixes
HPUX11_EXTERN_SENDFILE_FIXIDX,
HPUX11_EXTERN_SENDPATH_FIXIDX,
HPUX11_FABSF_FIXIDX,
+ HPUX11_PTHREAD_POINTER_FIXIDX,
HPUX11_PTHREAD_CONST_FIXIDX,
HPUX11_SIZE_T_FIXIDX,
HPUX11_SNPRINTF_FIXIDX,
HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux11_FabsfTests, apzHpux11_FabsfPatch, 0 },
+ { zHpux11_Pthread_PointerName, zHpux11_Pthread_PointerList,
+ apzHpux11_Pthread_PointerMachs,
+ HPUX11_PTHREAD_POINTER_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aHpux11_Pthread_PointerTests, apzHpux11_Pthread_PointerPatch, 0 },
+
{ zHpux11_Pthread_ConstName, zHpux11_Pthread_ConstList,
apzHpux11_Pthread_ConstMachs,
HPUX11_PTHREAD_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
};
/*
- * Fix C99 constant in __POINTER_SET define.
+ * The definitions for PTHREAD_MUTEX_INITIALIZER and similar initializers
+ * in pthread.h need to be constant expressions to be standard complient.
+ * As a result, we need to remove the void * casts in the initializers
+ * (see hpux11_pthread_const) and to change the __(M|C|RW)POINTER defines
+ * to use the long type.
+ */
+fix = {
+ hackname = hpux11_pthread_pointer;
+ mach = "*-hp-hpux11.[0-3]*";
+ files = sys/pthread.h;
+ select = "(void[ \t]*\\*)(m|c|rw)(_ptr)";
+
+ c_fix = format;
+ c_fix_arg = "long\t%2%3";
+ test_text = "#define __MPOINTER\t\tvoid\t *m_ptr";
+};
+
+/*
+ * Remove void pointer cast and fix C99 constant in __POINTER_SET defines.
*/
fix = {
hackname = hpux11_pthread_const;
mach = "*-hp-hpux11.[0-3]*";
files = sys/pthread.h;
- select = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
+ select = "^(#define[ \t]+__POINTER_SET[ \t0,]*)(.*\\))";
c_fix = format;
- c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)";
+ c_fix_arg = "%11";
test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
};