Found a buglet on Solaris - ctime_r

David Collier-Brown David.Collier-Brown at Sun.COM
Fri Jun 17 13:59:08 GMT 2005


  Found and reported as bug 2806, while actually trying to look at 
asynch I/O (:-)) Solaris needs a size parameter to ctime_r().

  As this is different from The Open Group/POSIX  Draft 6 (around Solaris 2.4),
but conformant to the final POSIX.1c (around Solaris 8?) standard, 
a test in Configure is probably needed.  I know HP-UX does it right too, 
but DEC did it the old way.  Solaris uses _POSIX_PTHREAD_SEMANTICS
and _REENTRANT flags,  if that helps... 

diff -u said:

froggy> diff -u libsmbclient.c.old libsmbclient.c
--- libsmbclient.c.old	2005-06-16 20:21:40.346406000 -0400
+++ libsmbclient.c	2005-06-17 09:38:06.790622000 -0400
@@ -3023,8 +3023,8 @@
 
                 DEBUG(4, ("smbc_utimes(%s, atime = %s mtime = %s)\n",
                           fname,
-                          ctime_r(&a_time, atimebuf),
-                          ctime_r(&m_time, mtimebuf)));
+                          ctime_r(&a_time, atimebuf, sizeof(atimebuf)),
+                          ctime_r(&m_time, mtimebuf, sizeof(mtimebuf))));
         }
 
 	if (smbc_parse_path(context, fname,

--dave
-- 
David Collier-Brown,      | Always do right. This will gratify
Sun Microsystems, Toronto | some people and astonish the rest
davecb at canada.sun.com     |                      -- Mark Twain
(416) 263-5733 (x65733)   |


More information about the samba-technical mailing list