aboutsummaryrefslogtreecommitdiff
path: root/gas/config/te-vms.h
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2009-09-07 09:15:31 +0000
committerTristan Gingold <gingold@adacore.com>2009-09-07 09:15:31 +0000
commitb11d79f2b289c401770bbb05c82fbd761e4657a4 (patch)
tree06920201805f32ac072b92020523013db881d053 /gas/config/te-vms.h
parentae794f602dafe672ec73eb4981eee725d8fc55ca (diff)
downloadgdb-b11d79f2b289c401770bbb05c82fbd761e4657a4.zip
gdb-b11d79f2b289c401770bbb05c82fbd761e4657a4.tar.gz
gdb-b11d79f2b289c401770bbb05c82fbd761e4657a4.tar.bz2
bfd/:
2009-09-07 Tristan Gingold <gingold@adacore.com> * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER, BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4 * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and st_mtim.tv_nsec to gas/configure.in (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo * configure: Regenerate. * config.in: Regenerate. * vmsutil.c: Moved to gas/config/te-vms.c * vmsutil.h: Removed. * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c (BFD32_BACKENDS): Remove vmsutil.lo * Makefile.in: Regenerate. gas/: 2009-09-07 Tristan Gingold <gingold@adacore.com> * Makefile.am (TARG_ENV_CFILES): New variable. Set to te-vms.c (POTFILES): Add $(TARG_ENV_CFILES) in definition. (EXTRA_as_new_SOURCES): Ditto. * Makefile: Regenerate. * acinclude.m4 (BFD_HAVE_TIME_TYPE_MEMBER, BFD_HAVE_SYS_STAT_TYPE_MEMBER): New macro created from bfd/bfd.m4. * configure.in: Add Tests for tm_gmtoff, st_mtim.tv_sec and st_mtim.tv_nsec (from bfd/configure.in). Check for time.h and sys/stat.h headers. Add te-vms.o in extra_objects if te_file is vms. * configure: Regenerate. * config.in: Regenerate. * config/te-vms.c: New file, from bfd/vmsutil.c (vms_dwarf2_file_time_name, vms_dwarf2_file_size_name) (vms_dwarf2_file_name): New functions. (vms_file_stats_name): Make it static, add a dirname parameter to locally create the full pathname. * config/te-vms.h: Add a copyright header. Declare the above functions. (DWARF2_FILE_TIME_NAME, DWARF2_FILE_SIZE_NAME, DWARF2_FILE_NAME): Use the above functions in the definition. * makefile.vms (OBJS): Add te-vms.obj. (te-vms.obj): Create a specific target. * configure.com: Create targ-env.h using a per target value. Compile te-vms.c for ia64.
Diffstat (limited to 'gas/config/te-vms.h')
-rw-r--r--gas/config/te-vms.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/gas/config/te-vms.h b/gas/config/te-vms.h
index 7c352ac..0c3a194 100644
--- a/gas/config/te-vms.h
+++ b/gas/config/te-vms.h
@@ -1,42 +1,41 @@
+/* Copyright 2009 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3,
+ or (at your option) any later version.
+
+ GAS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
#define TE_VMS
#include "obj-format.h"
-extern int vms_file_stats_name (const char *, long long *, long *, char *, int *);
+extern bfd_uint64_t vms_dwarf2_file_time_name (const char *, const char *);
+extern long vms_dwarf2_file_size_name (const char *, const char *);
+extern char *vms_dwarf2_file_name (const char *, const char *);
/* VMS debugger expects a separator. */
#define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR 1
/* VMS debugger needs the file timestamp. */
#define DWARF2_FILE_TIME_NAME(FILENAME,DIRNAME) \
- ({ \
- long long cdt; \
- char *filename = (char *) alloca (strlen (FILENAME) + strlen (DIRNAME) + 1);\
- strcpy (filename, DIRNAME); \
- strcat (filename, FILENAME); \
- ((vms_file_stats_name (filename, &cdt, 0, 0, 0) == 0) ? cdt : 0); \
- })
+ vms_dwarf2_file_time_name(FILENAME, DIRNAME)
/* VMS debugger needs the file size. */
#define DWARF2_FILE_SIZE_NAME(FILENAME,DIRNAME) \
- ({ \
- long siz; \
- char *filename = (char *) alloca (strlen (FILENAME) + strlen (DIRNAME) + 1);\
- strcpy (filename, DIRNAME); \
- strcat (filename, FILENAME); \
- ((vms_file_stats_name (filename, 0, &siz, 0, 0) == 0) ? siz : 0); \
- })
+ vms_dwarf2_file_size_name(FILENAME, DIRNAME)
/* VMS debugger needs the filename with version appended. */
/* Longest filename on VMS is 255 characters. Largest version is 32768. */
#define DWARF2_FILE_NAME(FILENAME,DIRNAME) \
- ({ \
- int ver; \
- char buff [255 + 7]; \
- char *filename = (char *) alloca (strlen (FILENAME) + strlen (DIRNAME) + 1);\
- strcpy (filename, DIRNAME); \
- strcat (filename, FILENAME); \
- vms_file_stats_name (filename, 0, 0, 0, &ver); \
- snprintf (buff, 255 + 7, "%s;%d", FILENAME, ver); \
- buff; \
- })
-
+ vms_dwarf2_file_name(FILENAME, DIRNAME)