diff liboctave/oct-env.cc @ 11006:aca961a3f387

provide gethostname function
author John W. Eaton <jwe@octave.org>
date Tue, 21 Sep 2010 03:35:46 -0400
parents bbe99b2a5ba7
children 2f29b765c0ef
line wrap: on
line diff
--- a/liboctave/oct-env.cc
+++ b/liboctave/oct-env.cc
@@ -450,9 +450,9 @@
 {
   if (host_name.empty ())
     {
-      char hostname[256];
+      char hostname[1024];
 
-      int status = octave_gethostname (hostname, 255);
+      int status = gnulib::gethostname (hostname, 1023);
 
       host_name = (status < 0) ? "unknown" : hostname;
     }