aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1995-07-05 07:47:43 +0000
committerFred Fish <fnf@specifix.com>1995-07-05 07:47:43 +0000
commiteac6290c7e7d08c683c379a4e1e0610418328208 (patch)
tree1a53eebe7189cec5de6e6b555c64c4025b6dfe1c /ld/ldmain.c
parent0d84aa0f4b86c17ea41cc03bb8c885d0f9fd269a (diff)
downloadgdb-eac6290c7e7d08c683c379a4e1e0610418328208.zip
gdb-eac6290c7e7d08c683c379a4e1e0610418328208.tar.gz
gdb-eac6290c7e7d08c683c379a4e1e0610418328208.tar.bz2
* ldmain.c (HAVE_SBRK): Define for everything except
specific systems that are known to not support sbrk. (main): Use HAVE_SBRK to decide whether or not to use sbrk.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 7c0b705..dd7c6ae 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -46,6 +46,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <string.h>
+/* Use sbrk() except on specific OS types */
+#if !defined(__amigados__) && !defined(WINDOWS_NT)
+#define HAVE_SBRK
+#endif
+
static char *get_emulation PARAMS ((int, char **));
static void set_scripts_dir PARAMS ((void));
@@ -346,14 +351,14 @@ main (argc, argv)
if (config.stats)
{
extern char **environ;
-#ifndef WINDOWS_NT /* no sbrk with NT */
+#ifdef HAVE_SBRK
char *lim = (char *) sbrk (0);
#endif
long run_time = get_run_time () - start_time;
fprintf (stderr, "%s: total time in link: %ld.%06ld\n",
program_name, run_time / 1000000, run_time % 1000000);
-#ifndef WINDOWS_NT
+#ifdef HAVE_SBRK
fprintf (stderr, "%s: data size %ld\n", program_name,
(long) (lim - (char *) &environ));
#endif