/*
+ * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
+ * the same interface as <stdarg.h>. No idea why they couldn't have just
+ * used the standard header.
+ */
+fix = {
+ hackname = AAB_solaris_sys_varargs_h;
+ files = "sys/varargs.h";
+ mach = '*-*-solaris*';
+ replace = "#ifdef __STDC__\n"
+ "#include <stdarg.h>\n"
+ "#else\n"
+ "#include <varargs.h>\n"
+ "#endif\n";
+};
+
+
+/*
* Fix non-ANSI memcpy declaration that conflicts with gcc's builtin
* declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because
* many other systems have similar text but correct versions of the file.
/*
- * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
- * the same interface as <stdarg.h>. No idea why they couldn't have just
- * used the standard header.
- */
-fix = {
- hackname = AAB_solaris_sys_varargs_h;
- files = "sys/varargs.h";
- mach = '*-*-solaris*';
- replace = "#ifdef __STDC__\n"
- "#include <stdarg.h>\n"
- "#else\n"
- "#include <varargs.h>\n"
- "#endif\n";
-};
-
-
-/*
* Completely replace <sys/varargs.h> with a file that includes gcc's
* stdarg.h or varargs.h files as appropriate.
*/
/*
+ * Make sure hpux defines abs in header.
+ */
+fix = {
+ hackname = hpux11_abs;
+ mach = ia64-hp-hpux11*;
+ files = stdlib.h;
+ select = "ifndef _MATH_INCLUDED";
+ c_fix = format;
+ c_fix_arg = "if !defined(_MATH_INCLUDED) || defined(__GNUG__)";
+// sed = "s/ifndef _MATH_INCLUDED/if !defined(_MATH_INCLUDED) || defined(__GNUG__)/";
+ test_text = "#ifndef _MATH_INCLUDED";
+};
+
+
+/*
* Prevent HP-UX 11 from defining __size_t and preventing size_t from
* being defined by having it define _hpux_size_t instead.
*/
"s@ __va_list)@ __gnuc_va_list)@\n"
"s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;"
"@typedef \\1 __not_va_list__;@\n"
+ "s@typedef[ \t]*__va_list__@typedef __gnuc_va_list@\n"
"s@GNUC_VA_LIST@GNUC_Va_LIST@\n"
"s@_NEED___VA_LIST@_NEED___Va_LIST@\n"
"s@VA_LIST@DUMMY_VA_LIST@\n"
* __thread is now a keyword.
*/
fix = {
- hackname = thread_keyword;
- files = "pthread.h";
- files = "bits/sigthread.h";
- select = "pthread_t __thread";
-
- sed = "s/pthread_t __thread\\([^a-z0-9_]\\)/pthread_t __thr\\1/";
+ hackname = thread_keyword;
+ files = "pthread.h";
+ files = "bits/sigthread.h";
+ select = "([* ])__thread([,)])";
+ c_fix = format;
+ c_fix_arg = "%1__thr%2";
- test_text = "extern int pthread_kill (pthread_t __thread, int __signo);";
+ test_text =
+ "extern int pthread_create (pthread_t *__restrict __thread,\n"
+ "extern int pthread_kill (pthread_t __thread, int __signo);\n"
+ "extern int pthread_cancel (pthread_t __thread);";
};
/*