/*
- * Delete C++ double pow (double, int) inline function from HP-UX 10
+ * Delete C++ double pow (double, int) inline function from HP-UX 10 & 11
* math.h to prevent clash with define in c_std/bits/std_cmath.h.
*/
fix = {
"# endif";
};
+fix = {
+ hackname = hpux11_cpp_pow_inline;
+ files = math.h;
+ select = " +inline double pow\\(double d,int expon\\) {\n"
+ " +return pow\\(d, \\(double\\)expon\\);\n"
+ " +}\n";
+ c_fix = format;
+ c_fix_arg = "";
+
+ test_text =
+ " inline double pow(double d,int expon) {\n"
+ " return pow(d, (double)expon);\n"
+ " }\n";
+};
/*
* Keep HP-UX 11 from stomping on C++ math namespace
/*
- * Sun Solaris 2.7 defines PTHREAD_MUTEX_INITIALIZER with a trailing
+ * Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing
* "0" for the last field of the pthread_mutex_t structure, which is
* of type upad64_t, which itself is typedef'd to int64_t, but with
* __STDC__ defined (e.g. by -ansi) it is a union. So change the
* initializer to "{0}" instead
*/
fix = {
- hackname = solaris27_mutex_init;
- select = '@\(#\)pthread.h' "[ \t]+1.26[ \t]+98/04/12 SMI";
+ hackname = solaris_mutex_init;
+ select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = pthread.h;
c_fix = format;
- c_fix_arg = "%1, {0}}";
- c_fix_arg = "(define[ \t]+PTHREAD_MUTEX_INITIALIZER.*),[ \t]*0}$";
+ c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
+ "%0\n"
+ "#else\n"
+ "%1, {0}}%3\n"
+ "#endif";
+ c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*)"
+ ",[ \t]*0}" "(|[ \t].*)$";
test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
- "#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, 0}";
+ "#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
+ "#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n"
+ "#define PTHREAD_RWLOCK_INITIALIZER\t"
+ "{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
};
hackname = uw7_byteorder_fix;
files = arpa/inet.h;
select = "in_port_t";
- test = "-f $DESTDIR/sys/byteorder.h";
+ test = "-f sys/byteorder.h";
#ifndef SVR5
mach = "*-*-sysv4*";
mach = "i?86-*-sysv5*";
c_fix = format;
c_fix_arg = "";
- c_fix_arg = "^extern.*(htons|ntohs).*\\(in_port_t\\).*\n";
+ c_fix_arg = "^extern.*[ \t](htons|ntohs).*\\(in_port_t\\).*;";
- test_text = "extern htons(in_port_t);"
+ test_text = "extern in_port_t\thtons __P((in_port_t));\n"
+ "extern in_port_t\tntohs __P((in_port_t));"
"`[ ! -d $DESTDIR/sys ] && mkdir $DESTDIR/sys\n"
- "echo '/* DUMMY */' >> sys/byteorder.h\n"
- "touch $DESTDIR/sys/byteorder.h`";
+ "echo '/* DUMMY */' >> sys/byteorder.h`";
};