Replace HO_VMS tests with VMS.
Tue Sep 13 16:20:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+ * flonum-konst.c: Change preprocessor tests of HO_VMS to just VMS.
+ * hex-value.c: Ditto.
+ * config/obj-vms.c: Ditto.
+
* config/tc-sparc.c (sparc_ip): Replace as_bad/exit sequence with
a call to as_fatal.
* config/tc-i860.c (i860_ip): Ditto.
* Makefile.in (*_FOR_TARGET, INSTALL_XFORM, install, uninstall):
Rewrite handling of program_transform_name.
- * configure.in: Test for "unlink" and "delete", define
- USE_DELETE_FOR_UNLINK if only the latter is found. Not expected
- to be triggered on UNIX/POSIX systems.
- * acconfig.h (USE_DELETE_FOR_UNLINK): Undef here, provide
- comments.
+ * configure.in: Test for functions unlink and delete.
+ * as.h: If unlink isn't available but delete is, define unlink to
+ be delete.
Update for autoconf 1.118:
* gdbinit.in: New file, created from old .gdbinit.
/* Needed only for sparc configuration */
#undef sparcv9
-
-/* VMS does not provide an "unlink" function, but "delete" is provided.
- Autoconf will never set this (at least until we have an "autovms"),
- but this provides a halfway reasonable machine-independent hook. */
-#undef USE_DELETE_FOR_UNLINK
extern void free ();
#endif
-#ifdef USE_DELETE_FOR_UNLINK
+/* This is needed for VMS. */
+#if ! defined (HAVE_UNLINK) && defined (HAVE_DELETE)
#define unlink delete
#endif
/* Needed only for sparc configuration */
#undef sparcv9
-/* VMS does not provide an "unlink" function, but "delete" is provided.
- Autoconf will never set this (at least until we have an "autovms"),
- but this provides a halfway reasonable machine-independent hook. */
-#undef USE_DELETE_FOR_UNLINK
+/* Define if you have the delete function. */
+#undef HAVE_DELETE
+
+/* Define if you have the unlink function. */
+#undef HAVE_UNLINK
/* Define if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* What we do if there is a goof. */
#define error as_fatal
-#ifdef HO_VMS /* These are of no use if we are cross assembling. */
+#ifdef VMS /* These are of no use if we are cross assembling. */
#include <fab.h> /* Define File Access Block */
#include <nam.h> /* Define NAM Block */
#include <xab.h> /* Define XAB - all different types*/
/*
* Macros for moving data around. Must work on big-endian systems.
*/
-#ifdef HO_VMS /* These are more efficient for VMS->VMS systems */
+#ifdef VMS /* These are more efficient for VMS->VMS systems */
#define COPY_LONG(dest,val) {*(long *) dest = val; }
#define COPY_SHORT(dest,val) {*(short *) dest = val; }
#else
static
Create_VMS_Object_File ()
{
-#if defined(eunice) || !defined(HO_VMS)
+#if defined(eunice) || !defined(VMS)
VMS_Object_File_FD = creat (out_file_name, 0777, "var");
#else /* eunice */
VMS_Object_File_FD = creat (out_file_name, 0, "rfm=var",
/*
* Write the data to the file
*/
-#ifndef HO_VMS /* For cross-assembly purposes. */
+#ifndef VMS /* For cross-assembly purposes. */
md_number_to_chars((char *) &RecLen, Object_Record_Offset, 2);
i = write (VMS_Object_File_FD, &RecLen, 2);
-#endif /* not HO_VMS */
+#endif /* not VMS */
i = write (VMS_Object_File_FD,
Object_Record_Buffer,
Object_Record_Offset);
if (i != Object_Record_Offset)
error ("I/O error writing VMS object file");
-#ifndef HO_VMS /* When cross-assembling, we need to pad the record to an even
+#ifndef VMS /* When cross-assembling, we need to pad the record to an even
number of bytes. */
/* pad it if needed */
zero = 0;
if (Object_Record_Offset & 1 != 0)
write (VMS_Object_File_FD, &zero, 1);
-#endif /* not HO_VMS */
+#endif /* not VMS */
/*
* The buffer is now empty
*/
/* @@ This should not be here!! The same would presumably be needed
if we were writing vax-bsd a.out files on a vms system. Put it
someplace else! */
-#ifndef HO_VMS /* For cross-assembly purposes. */
+#ifndef VMS /* For cross-assembly purposes. */
/* Write a 0xffff into the file, which means "End of File" */
write (VMS_Object_File_FD, &m_one, 2);
-#endif /* not HO_VMS */
+#endif /* not VMS */
close (VMS_Object_File_FD);
}
\f
register char *cp, *cp1;
int Status, i;
char Local[512];
-#ifndef HO_VMS /* Used for cross-assembly */
+#ifndef VMS /* Used for cross-assembly */
i = strlen (Filename);
-#else /* HO_VMS */
+#else /* VMS */
static struct FAB Fab;
static struct NAM Nam;
static struct XABDAT Date_Xab;
* Calculate the size of the resultant string
*/
i = Nam.nam$b_rsl;
-#endif /* HO_VMS */
+#endif /* VMS */
/*
* Size of record
*/
*/
COPY_SHORT (cp, ID_Number);
cp += sizeof (short);
-#ifndef HO_VMS
+#ifndef VMS
/*
* Creation Date. Unknown, so we fill with zeroes.
*/
*/
*cp++ = i;
cp1 = Rs_String;
-#endif /* HO_VMS */
+#endif /* VMS */
while (--i >= 0)
*cp++ = *cp1++;
/*
-#ifndef HO_VMS
+#ifndef VMS
#include <sys/types.h>
#include <time.h>
sprintf (Now, "%2s-%3s-%s %s", pnt + 8, pnt + 4, pnt + 20, pnt + 11);
}
-#endif /* not HO_VMS */
+#endif /* not VMS */
/*
* Write the MHD (Module Header) records
*/
/*
* Creation time is "now" (17 chars of time string)
*/
-#ifndef HO_VMS
+#ifndef VMS
get_VMS_time_on_unix (&Now[0]);
-#else /* HO_VMS */
+#else /* VMS */
Descriptor.Size = 17;
Descriptor.Ptr = Now;
sys$asctim (0, &Descriptor, 0, 0);
-#endif /* HO_VMS */
+#endif /* VMS */
for (i = 0; i < 17; i++)
PUT_CHAR (Now[i]);
/*
# VMS needs this.
-echo $ac_n "checking for unlink""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_unlink'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
-else
- cat > conftest.$ac_ext <<EOF
-#line 1355 "configure"
-#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
-int main() { return 0; }
-int t() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_unlink) || defined (__stub___unlink)
-choke me
-#else
-/* Override any gcc2 internal prototype to avoid an error. */
-char unlink(); unlink();
-#endif
-
-; return 0; }
-EOF
-if eval $ac_link; then
- rm -rf conftest*
- eval "ac_cv_func_unlink=yes"
-else
- rm -rf conftest*
- eval "ac_cv_func_unlink=no"
-fi
-rm -f conftest*
-
-fi
-if eval "test \"`echo '$ac_cv_func_'unlink`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- :
-else
- echo "$ac_t""no" 1>&4
-echo $ac_n "checking for delete""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_delete'+set}'`\" = set"; then
+for ac_func in unlink delete
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
+if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1393 "configure"
+#line 1357 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
int main() { return 0; }
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_delete) || defined (__stub___delete)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error. */
-char delete(); delete();
+char $ac_func(); $ac_func();
#endif
; return 0; }
EOF
if eval $ac_link; then
rm -rf conftest*
- eval "ac_cv_func_delete=yes"
+ eval "ac_cv_func_$ac_func=yes"
else
rm -rf conftest*
- eval "ac_cv_func_delete=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_func_'delete`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&4
- cat >> confdefs.h <<\EOF
-#define USE_DELETE_FOR_UNLINK 1
+ ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
-
+ break
else
echo "$ac_t""no" 1>&4
-{ echo "configure: No unlink or delete function available on this system." 1>&2; exit 1; }
-fi
-
fi
+done
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
+#line 1406 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1500 "configure"
+#line 1463 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1536 "configure"
+#line 1499 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1575 "configure"
+#line 1538 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
AC_C_INLINE
# VMS needs this.
-AC_CHECK_FUNC(unlink,,
- AC_CHECK_FUNC(delete,AC_DEFINE(USE_DELETE_FOR_UNLINK),
- AC_MSG_ERROR(No unlink or delete function available on this system.)))
+AC_CHECK_FUNCS(unlink delete, break)
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
# enough, but on some of those systems, the assert macro relies on requoting
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __
};
-#ifdef HO_VMS
+#ifdef VMS
dummy2 ()
{
}