|
From: | Gainey, Joe \(AT - Atlanta\) |
Subject: | [bug-inetutils] inetutils-1.4.2 on Solaris 9 SPARC/i86pc |
Date: | Tue, 3 May 2005 20:10:16 -0400 |
I've seen alot of correspondence on the list about problems resulting in compiler errors while compiling xmalloc.c and setenv.c for inetutils-1.4.2, however, I have not seen any fixes to get it to compile on Solaris 9.
So first, I'ld like to ask if there is a fix, or if i'm just not doing it right (./configure; make?). Second I'ld like to ask if inetutils is obsolete and there is something better, it doesn't seem like any bug fixes have gone in lately.
finally, I am particularly interested in just the clients right now. To this end, I have been able to get them to compile after creating my own patches which are included here:
*** xmalloc.c Tue May 3 20:06:17 2005
--- /tmp/xmalloc.c Tue May 3 19:58:45 2005
***************
*** 23,28 ****
--- 23,29 ----
#if STDC_HEADERS
# include <stdlib.h>
+ # include <stdio.h>
#else
void *calloc ();
void *malloc ();
***************
*** 34,40 ****
--- 35,43 ----
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
+ #ifdef __GLIBC__
#include "error.h"
+ #endif
#include "xalloc.h"
#ifndef EXIT_FAILURE
***************
*** 53,59 ****
/* Exit value when the requested amount of memory is not available.
The caller may set it to some other value. */
! int xalloc_exit_failure = EXIT_FAILURE;
/* If non NULL, call this function when memory is exhausted. */
void (*xalloc_fail_func) PARAMS ((void)) = 0;
--- 56,64 ----
/* Exit value when the requested amount of memory is not available.
The caller may set it to some other value. */
! #ifdef __GLIBC__
! int xalloc_exit_faliure = EXIT_FAILURE;
! #endif
/* If non NULL, call this function when memory is exhausted. */
void (*xalloc_fail_func) PARAMS ((void)) = 0;
***************
*** 67,73 ****
--- 72,82 ----
{
if (xalloc_fail_func)
(*xalloc_fail_func) ();
+ #ifdef __GLIBC__
error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
+ #else
+ fprintf(stderr, "%s", _(xalloc_msg_memory_exhausted));
+ #endif
/* The `noreturn' cannot be given to error, since it may return if
its first argument is 0. To help compilers understand the
xalloc_die does terminate, call exit. */
*** setenv.c Tue May 3 20:06:57 2005
--- /tmp/setenv.c Tue May 3 19:54:24 2005
***************
*** 34,39 ****
--- 34,43 ----
# include <unistd.h>
#endif
+ #if defined(__STDC__) || defined(__GNUC__)
+ extern char **environ;
+ #endif
+
#ifndef HAVE_GNU_LD
# define __environ environ
#endif
[Prev in Thread] | Current Thread | [Next in Thread] |