[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libsm: Changes to 'upstream-unstable'



 .gitignore       |    7 ++
 Makefile.am      |    6 --
 README           |   30 ++++++++++++
 configure.ac     |   27 ++++++----
 src/.gitignore   |    6 --
 src/Makefile.am  |    3 -
 src/SMlibint.h   |   37 +++++++++-----
 src/globals.h    |   49 -------------------
 src/sm_client.c  |  136 +++++++++++++++++--------------------------------------
 src/sm_error.c   |   40 +++-------------
 src/sm_genid.c   |   28 +++++++++--
 src/sm_manager.c |   75 +++++-------------------------
 src/sm_misc.c    |   61 ++++--------------------
 src/sm_process.c |   24 ++-------
 14 files changed, 186 insertions(+), 343 deletions(-)

New commits:
commit 82bbf42a2ba0401a8346505b1292ddb7b58f4507
Author: Rémi Cardona <remi@gentoo.org>
Date:   Fri Aug 7 14:19:50 2009 +0200

    libSM 1.1.1, update libtool version

diff --git a/configure.ac b/configure.ac
index cf36193..2d1f09a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([libSM],
-        1.1.0,
+        1.1.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         libSM)
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 188ac4d..41d074b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ if WITH_LIBUUID
 AM_CFLAGS += $(LIBUUID_CFLAGS) -DHAVE_LIBUUID
 endif
 
-libSM_la_LDFLAGS = -version-number 6:0:0 -no-undefined
+libSM_la_LDFLAGS = -version-number 6:0:1 -no-undefined
 
 libSM_la_LIBADD = $(SM_LIBS) $(XTRANS_LIBS)
 

commit 45720a2e266748ac15bc0544b56e035383695588
Author: Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
Date:   Sat May 16 01:01:39 2009 +0200

    Use FreeBSD uuid functions when available.
    
    If the system provide the uuid_create function assume building on FreeBSD
    or another OS with a compatible uuid interface. If that's the case, ignore
    libuuid and just use the system functions without extra deps.

diff --git a/configure.ac b/configure.ac
index 9730b70..cf36193 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,12 +42,15 @@ XTRANS_CONNECTION_FLAGS
 
 AC_ARG_WITH(libuuid, AC_HELP_STRING([--with-libuuid], [Build with libuuid support for client IDs]))
 
-if test x"$with_libuuid" != xno; then
-	PKG_CHECK_MODULES(LIBUUID, uuid, [HAVE_LIBUUID=yes], [HAVE_LIBUUID=no])
-fi
-if test x"$with_libuuid" = xyes && test x"$HAVE_LIBUUID" = xno; then
-	AC_MSG_ERROR([requested libuuid support but uuid.pc not found])
-fi
+AC_CHECK_FUNCS([uuid_create], [], [
+    if test x"$with_libuuid" != xno && test x"$have_system_uuid" != xyes; then
+        PKG_CHECK_MODULES(LIBUUID, uuid, [HAVE_LIBUUID=yes], [HAVE_LIBUUID=no])
+    fi
+    if test x"$with_libuuid" = xyes && test x"$HAVE_LIBUUID" = xno; then
+        AC_MSG_ERROR([requested libuuid support but uuid.pc not found])
+    fi
+])
+
 AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes)
 
 XORG_RELEASE_VERSION
diff --git a/src/sm_genid.c b/src/sm_genid.c
index 391a10e..f6adda3 100644
--- a/src/sm_genid.c
+++ b/src/sm_genid.c
@@ -76,7 +76,9 @@ in this Software without prior written authorization from The Open Group.
 #define TCPCONN
 #endif
 
-#if defined(HAVE_LIBUUID)
+#if defined(HAVE_UUID_CREATE)
+#include <uuid.h>
+#elif defined(HAVE_LIBUUID)
 #include <uuid/uuid.h>
 #endif
 
@@ -84,7 +86,26 @@ in this Software without prior written authorization from The Open Group.
 char *
 SmsGenerateClientID(SmsConn smsConn)
 {
-#if defined(HAVE_LIBUUID)
+#if defined(HAVE_UUID_CREATE)
+    char *id;
+    char **temp;
+    uuid_t uuid;
+    uint32_t status;
+
+    uuid_create(&uuid, &status);
+
+    uuid_to_string(&uuid, &temp, &status);
+
+    if ((id = malloc (strlen (temp) + 2)) != NULL)
+    {
+        id[1] = '2';
+        strcpy (id+1, temp);
+    }
+
+    free(temp);
+
+    return id;
+#elif defined(HAVE_LIBUUID)
     char *id;
     char temp[256];
     uuid_t uuid;

commit 0389dbec3b738fa7e1dbef2b5317124b95bdfb20
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Feb 16 01:27:24 2009 +0100

    Typo fix
    
    This makes us really error out if we want libuuid but can't find it.

diff --git a/configure.ac b/configure.ac
index 1d67f62..9730b70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ AC_ARG_WITH(libuuid, AC_HELP_STRING([--with-libuuid], [Build with libuuid suppor
 if test x"$with_libuuid" != xno; then
 	PKG_CHECK_MODULES(LIBUUID, uuid, [HAVE_LIBUUID=yes], [HAVE_LIBUUID=no])
 fi
-if test x"$with_libuuid" = xyes && test HAVE_LIBUUID = no; then
+if test x"$with_libuuid" = xyes && test x"$HAVE_LIBUUID" = xno; then
 	AC_MSG_ERROR([requested libuuid support but uuid.pc not found])
 fi
 AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes)

commit b75eae83221465bd0da4d21d0bab5af379dc31c1
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Mon Feb 2 20:34:30 2009 -0800

    Add README with pointers to mailing list, bugzilla & git repos
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/README b/README
index e69de29..2094328 100644
--- a/README
+++ b/README
@@ -0,0 +1,30 @@
+libSM - X Session Management Library
+
+Documentation for this API can be found in the SMlib document in the
+doc/xorg-docs module of the X distribution, also available online at:
+
+	http://xorg.freedesktop.org/releases/X11R7.0/doc/PDF/SMlib.pdf
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/lib/libSM
+
+        http://cgit.freedesktop.org/xorg/lib/libSM
+
+For patch submission instructions, see:
+
+	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+

commit 896aeb5dd128fc8e489106fa7aaa5cee1e589106
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Wed Jan 28 18:48:47 2009 -0200

    Janitor: ansification, make distcheck, compiler warnings.

diff --git a/.gitignore b/.gitignore
index 7cfac9c..e8d3c11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
 aclocal.m4
 autom4te.cache
 config.guess
@@ -20,3 +22,8 @@ sm.pc
 stamp-h1
 *.o
 *~
+*.lo
+*.la
+libSM-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index aa2fb39..55febc4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,14 +3,12 @@ SUBDIRS=src
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = sm.pc
 
-EXTRA_DIST=sm.pc.in
-
-EXTRA_DIST += ChangeLog
+EXTRA_DIST = sm.pc.in ChangeLog
 MAINTAINERCLEANFILES = ChangeLog
 
 .PHONY: ChangeLog
 
 ChangeLog:
-	(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+	$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index faf8c4d..1d67f62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,14 +12,19 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
 AM_CONFIG_HEADER([config.h])
 
 # Checks for programs.
 AC_PROG_LIBTOOL
 AC_PROG_CC
+XORG_CWARNFLAGS
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(SM, ice xproto)
+SM_CFLAGS="$CWARNFLAGS $SM_CFLAGS"
 AC_SUBST(SM_CFLAGS)
 AC_SUBST(SM_LIBS)
 
@@ -45,14 +50,8 @@ if test x"$with_libuuid" = xyes && test HAVE_LIBUUID = no; then
 fi
 AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes)
 
-if test "x$GCC" = "xyes"; then
-	GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-	-Wmissing-prototypes -Wmissing-declarations \
-	-Wnested-externs -fno-strict-aliasing"
-	CFLAGS="$GCC_WARNINGS $CFLAGS"
-fi
-
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile
 	   src/Makefile
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 1c0eccc..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-libSM.la
-*.lo
-Makefile
-Makefile.in
diff --git a/src/Makefile.am b/src/Makefile.am
index dbfef37..188ac4d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,6 @@ endif
 
 libSM_la_SOURCES = \
 	SMlibint.h \
-	globals.h \
 	sm_auth.c \
 	sm_client.c \
 	sm_error.c \
diff --git a/src/SMlibint.h b/src/SMlibint.h
index 387f0bd..350b970 100644
--- a/src/SMlibint.h
+++ b/src/SMlibint.h
@@ -488,6 +488,24 @@ struct _SmsConn {
 /*
  * Extern declarations
  */
+extern void
+_SmcProcessMessage(IceConn iceConn, IcePointer clientData, int opcode,
+		   unsigned long length, Bool swap,
+		   IceReplyWaitInfo *replyWait, Bool *replyReadyRet);
+
+extern void
+_SmsProcessMessage(IceConn iceConn, IcePointer clientData, int opcode,
+		   unsigned long length, Bool swap);
+
+extern void
+_SmcDefaultErrorHandler(SmcConn smcConn, Bool swap, int offendingMinorOpcode,
+			unsigned long offendingSequence, int errorClass,
+			int severity, SmPointer values);
+
+extern void
+_SmsDefaultErrorHandler(SmsConn smsConn, Bool swap, int offendingMinorOpcode,
+			unsigned long offendingSequence, int errorClass,
+			int severity, SmPointer values);
 
 extern int     _SmcOpcode;
 extern int     _SmsOpcode;
diff --git a/src/globals.h b/src/globals.h
deleted file mode 100644
index 40b0ffc..0000000
--- a/src/globals.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $Xorg: globals.h,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */
-
-/*
-
-Copyright 1993, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/* $XFree86: xc/lib/SM/globals.h,v 1.4 2001/12/14 19:53:55 dawes Exp $ */
-
-/*
- * Author: Ralph Mor, X Consortium
- */
-
-extern void _SmcDefaultErrorHandler ();
-extern void _SmsDefaultErrorHandler ();
-
-int 	_SmcOpcode = 0;
-int 	_SmsOpcode = 0;
-
-#ifndef __UNIXOS2__
-SmsNewClientProc _SmsNewClientProc;
-SmPointer        _SmsNewClientData;
-#else
-SmsNewClientProc _SmsNewClientProc = 0;
-SmPointer        _SmsNewClientData = 0;
-#endif
-
-SmcErrorHandler _SmcErrorHandler = _SmcDefaultErrorHandler;
-SmsErrorHandler _SmsErrorHandler = _SmsDefaultErrorHandler;
diff --git a/src/sm_client.c b/src/sm_client.c
index de79452..a5c714f 100644
--- a/src/sm_client.c
+++ b/src/sm_client.c
@@ -33,29 +33,32 @@ in this Software without prior written authorization from The Open Group.
 #endif
 #include <X11/SM/SMlib.h>
 #include "SMlibint.h"
-#include "globals.h"
 
-extern IcePoAuthStatus _IcePoMagicCookie1Proc ();
-extern void _SmcProcessMessage ();
-static void set_callbacks();
+int 	_SmcOpcode = 0;
+int 	_SmsOpcode = 0;
+
+#ifndef __UNIXOS2__
+SmsNewClientProc _SmsNewClientProc;
+SmPointer        _SmsNewClientData;
+#else
+SmsNewClientProc _SmsNewClientProc = 0;
+SmPointer        _SmsNewClientData = 0;
+#endif
+
+SmcErrorHandler _SmcErrorHandler = _SmcDefaultErrorHandler;
+SmsErrorHandler _SmsErrorHandler = _SmsDefaultErrorHandler;
+
+
+static void
+set_callbacks(SmcConn smcConn, unsigned long mask, SmcCallbacks *callbacks);
 
 
 SmcConn
-SmcOpenConnection (networkIdsList, context,
-    xsmpMajorRev, xsmpMinorRev, mask, callbacks,
-    previousId, clientIdRet, errorLength, errorStringRet)
-
-char 		*networkIdsList;
-SmPointer	context;
-int		xsmpMajorRev;
-int		xsmpMinorRev;
-unsigned long   mask;
-SmcCallbacks	*callbacks;
-char 		*previousId;
-char 		**clientIdRet;
-int  		errorLength;
-char 		*errorStringRet;
-
+SmcOpenConnection(char *networkIdsList, SmPointer context,
+		  int xsmpMajorRev, int xsmpMinorRev,
+		  unsigned long mask, SmcCallbacks *callbacks,
+		  char *previousId, char **clientIdRet,
+		  int errorLength, char *errorStringRet)
 {
     SmcConn			smcConn;
     IceConn			iceConn;
@@ -283,12 +286,7 @@ char 		*errorStringRet;
 
 
 SmcCloseStatus
-SmcCloseConnection (smcConn, count, reasonMsgs)
-
-SmcConn smcConn;
-int	count;
-char    **reasonMsgs;
-
+SmcCloseConnection(SmcConn smcConn, int count, char **reasonMsgs)
 {
     IceConn			iceConn = smcConn->iceConn;
     smCloseConnectionMsg 	*pMsg;
@@ -356,12 +354,7 @@ char    **reasonMsgs;
 
 
 void
-SmcModifyCallbacks (smcConn, mask, callbacks)
-
-SmcConn    	smcConn;
-unsigned long 	mask;
-SmcCallbacks	*callbacks;
-
+SmcModifyCallbacks(SmcConn smcConn, unsigned long mask, SmcCallbacks *callbacks)
 {
     set_callbacks (smcConn, mask, callbacks);
 }
@@ -369,12 +362,7 @@ SmcCallbacks	*callbacks;
 
 
 void
-SmcSetProperties (smcConn, numProps, props)
-
-SmcConn    	smcConn;
-int      	numProps;
-SmProp       	**props;
-
+SmcSetProperties(SmcConn smcConn, int numProps, SmProp **props)
 {
     IceConn		iceConn = smcConn->iceConn;
     smSetPropertiesMsg	*pMsg;
@@ -400,12 +388,7 @@ SmProp       	**props;
 
 
 void
-SmcDeleteProperties (smcConn, numProps, propNames)
-
-SmcConn smcConn;
-int     numProps;
-char	**propNames;
-
+SmcDeleteProperties(SmcConn smcConn, int numProps, char **propNames)
 {
     IceConn			iceConn = smcConn->iceConn;
     smDeletePropertiesMsg 	*pMsg;
@@ -433,12 +416,8 @@ char	**propNames;
 
 
 Status
-SmcGetProperties (smcConn, propReplyProc, clientData)
-
-SmcConn		 smcConn;
-SmcPropReplyProc propReplyProc;
-SmPointer	 clientData;
-
+SmcGetProperties(SmcConn smcConn, SmcPropReplyProc propReplyProc,
+		 SmPointer clientData)
 {
     IceConn		iceConn = smcConn->iceConn;
     _SmcPropReplyWait 	*wait, *ptr;
@@ -471,13 +450,8 @@ SmPointer	 clientData;
 
 
 Status
-SmcInteractRequest (smcConn, dialogType, interactProc, clientData)
-
-SmcConn 	smcConn;
-int		dialogType;
-SmcInteractProc	interactProc;
-SmPointer	clientData;
-
+SmcInteractRequest(SmcConn smcConn, int dialogType,
+		   SmcInteractProc interactProc, SmPointer clientData)
 {
     IceConn			iceConn = smcConn->iceConn;
     smInteractRequestMsg	*pMsg;
@@ -515,11 +489,7 @@ SmPointer	clientData;
 
 
 void
-SmcInteractDone (smcConn, cancelShutdown)
-
-SmcConn smcConn;
-Bool 	cancelShutdown;
-
+SmcInteractDone(SmcConn smcConn, Bool cancelShutdown)
 {
     IceConn		iceConn = smcConn->iceConn;
     smInteractDoneMsg	*pMsg;
@@ -535,16 +505,8 @@ Bool 	cancelShutdown;
 
 
 void
-SmcRequestSaveYourself (smcConn, saveType, shutdown, interactStyle,
-	fast, global)
-
-SmcConn smcConn;
-int	saveType;
-Bool 	shutdown;
-int	interactStyle;
-Bool	fast;
-Bool	global;
-
+SmcRequestSaveYourself(SmcConn smcConn, int saveType, Bool shutdown,
+		       int interactStyle, Bool fast, Bool global)
 {
     IceConn			iceConn = smcConn->iceConn;
     smSaveYourselfRequestMsg	*pMsg;
@@ -564,12 +526,9 @@ Bool	global;
 
 
 Status
-SmcRequestSaveYourselfPhase2 (smcConn, saveYourselfPhase2Proc, clientData)
-
-SmcConn 			smcConn;
-SmcSaveYourselfPhase2Proc	saveYourselfPhase2Proc;
-SmPointer			clientData;
-
+SmcRequestSaveYourselfPhase2(SmcConn smcConn,
+			     SmcSaveYourselfPhase2Proc saveYourselfPhase2Proc,
+			     SmPointer clientData)
 {
     IceConn		iceConn = smcConn->iceConn;
     _SmcPhase2Wait 	*wait;
@@ -599,11 +558,7 @@ SmPointer			clientData;
 
 
 void
-SmcSaveYourselfDone (smcConn, success)
-
-SmcConn smcConn;
-Bool	success;
-
+SmcSaveYourselfDone(SmcConn smcConn, Bool success)
 {
     IceConn			iceConn = smcConn->iceConn;
     smSaveYourselfDoneMsg	*pMsg;
@@ -619,12 +574,7 @@ Bool	success;
 
 
 static void
-set_callbacks (smcConn, mask, callbacks)
-
-SmcConn    	smcConn;
-unsigned long 	mask;
-SmcCallbacks	*callbacks;
-
+set_callbacks(SmcConn smcConn, unsigned long mask, SmcCallbacks *callbacks)
 {
     if (mask & SmcSaveYourselfProcMask)
     {
diff --git a/src/sm_error.c b/src/sm_error.c
index 615cead..d5c15fc 100644
--- a/src/sm_error.c
+++ b/src/sm_error.c
@@ -45,18 +45,9 @@ in this Software without prior written authorization from The Open Group.
  */
 
 void
-_SmcDefaultErrorHandler (smcConn, swap,
-    offendingMinorOpcode, offendingSequence,
-    errorClass, severity, values)
-
-SmcConn		smcConn;
-Bool		swap;
-int 		offendingMinorOpcode;
-unsigned long 	offendingSequence;
-int 		errorClass;
-int 		severity;
-SmPointer 	values;
-
+_SmcDefaultErrorHandler(SmcConn smcConn, Bool swap, int offendingMinorOpcode,
+			unsigned long offendingSequence, int errorClass,
+			int severity, SmPointer values)
 {
     char *pData = (char *) values;
     const char *str;
@@ -177,18 +168,9 @@ SmPointer 	values;
  */
 
 void
-_SmsDefaultErrorHandler (smsConn, swap,
-    offendingMinorOpcode, offendingSequence,
-    errorClass, severity, values)
-
-SmsConn		smsConn;
-Bool		swap;
-int 		offendingMinorOpcode;
-unsigned long 	offendingSequence;
-int 		errorClass;
-int 		severity;
-SmPointer 	values;
-
+_SmsDefaultErrorHandler(SmsConn smsConn, Bool swap, int offendingMinorOpcode,
+			unsigned long offendingSequence, int errorClass,
+			int severity, SmPointer values)
 {
     char *pData = (char *) values;
     const char *str;
@@ -301,10 +283,7 @@ SmPointer 	values;
  */
  
 SmcErrorHandler
-SmcSetErrorHandler (handler)
-
-SmcErrorHandler handler;
-
+SmcSetErrorHandler(SmcErrorHandler handler)
 {
     SmcErrorHandler oldHandler = _SmcErrorHandler;
 
@@ -325,10 +304,7 @@ SmcErrorHandler handler;
  */
  
 SmsErrorHandler
-SmsSetErrorHandler (handler)
-
-SmsErrorHandler handler;
-
+SmsSetErrorHandler(SmsErrorHandler handler)
 {
     SmsErrorHandler oldHandler = _SmsErrorHandler;
 
diff --git a/src/sm_genid.c b/src/sm_genid.c
index 6f90a48..391a10e 100644
--- a/src/sm_genid.c
+++ b/src/sm_genid.c
@@ -82,8 +82,7 @@ in this Software without prior written authorization from The Open Group.
 
 
 char *
-SmsGenerateClientID (smsConn)
-    SmsConn smsConn;
+SmsGenerateClientID(SmsConn smsConn)
 {
 #if defined(HAVE_LIBUUID)
     char *id;
diff --git a/src/sm_manager.c b/src/sm_manager.c
index 51ac548..6882145 100644
--- a/src/sm_manager.c
+++ b/src/sm_manager.c
@@ -42,9 +42,6 @@ in this Software without prior written authorization from The Open Group.
 #undef shutdown
 #endif
 
-extern IcePaAuthStatus _IcePaMagicCookie1Proc ();
-extern void _SmsProcessMessage ();
-
 
 
 static Status
@@ -117,17 +114,9 @@ _SmsProtocolSetupProc (IceConn    iceConn,
 
 
 Status
-SmsInitialize (vendor, release, newClientProc, managerData,
-    hostBasedAuthProc, errorLength, errorStringRet)
-
-char 		 		*vendor;
-char 		 		*release;
-SmsNewClientProc 		newClientProc;
-SmPointer	 		managerData;
-IceHostBasedAuthProc		hostBasedAuthProc;
-int  		 		errorLength;
-char 		 		*errorStringRet;
-
+SmsInitialize(char *vendor, char *release, SmsNewClientProc newClientProc,
+	      SmPointer managerData, IceHostBasedAuthProc hostBasedAuthProc,
+	      int errorLength, char *errorStringRet)
 {
     const char *auth_names[] = {"MIT-MAGIC-COOKIE-1"};
     IcePaAuthProc auth_procs[] = {_IcePaMagicCookie1Proc};
@@ -186,10 +175,7 @@ char 		 		*errorStringRet;
 
 
 char *
-SmsClientHostName (smsConn)
-
-SmsConn smsConn;
-
+SmsClientHostName(SmsConn smsConn)
 {
     return (IceGetPeerName (smsConn->iceConn));
 }
@@ -197,11 +183,7 @@ SmsConn smsConn;
 
 
 Status
-SmsRegisterClientReply (smsConn, clientId)
-
-SmsConn smsConn;
-char	*clientId;
-
+SmsRegisterClientReply(SmsConn smsConn, char *clientId)
 {
     IceConn			iceConn = smsConn->iceConn;
     int				extra;
@@ -231,14 +213,8 @@ char	*clientId;
 
 
 void
-SmsSaveYourself (smsConn, saveType, shutdown, interactStyle, fast)
-
-SmsConn smsConn;
-int	saveType;
-Bool 	shutdown;
-int	interactStyle;
-Bool	fast;
-
+SmsSaveYourself(SmsConn smsConn, int saveType, Bool shutdown,
+		int interactStyle, Bool fast)
 {
     IceConn		iceConn = smsConn->iceConn;
     smSaveYourselfMsg	*pMsg;
@@ -274,10 +250,7 @@ Bool	fast;
 
 
 void
-SmsSaveYourselfPhase2 (smsConn)
-
-SmsConn smsConn;
-
+SmsSaveYourselfPhase2(SmsConn smsConn)
 {
     IceConn	iceConn = smsConn->iceConn;
 
@@ -288,10 +261,7 @@ SmsConn smsConn;
 
 
 void
-SmsInteract (smsConn)
-
-SmsConn smsConn;
-
+SmsInteract(SmsConn smsConn)
 {
     IceConn	iceConn = smsConn->iceConn;
 
@@ -304,10 +274,7 @@ SmsConn smsConn;
 
 
 void
-SmsDie (smsConn)
-
-SmsConn smsConn;
-
+SmsDie(SmsConn smsConn)
 {
     IceConn	iceConn = smsConn->iceConn;
 
@@ -318,10 +285,7 @@ SmsConn smsConn;
 
 
 void
-SmsSaveComplete (smsConn)
-
-SmsConn smsConn;
-
+SmsSaveComplete(SmsConn smsConn)
 {
     IceConn	iceConn = smsConn->iceConn;
 
@@ -332,10 +296,7 @@ SmsConn smsConn;
 
 
 void
-SmsShutdownCancelled (smsConn)
-
-SmsConn smsConn;
-
+SmsShutdownCancelled(SmsConn smsConn)
 {
     IceConn	iceConn = smsConn->iceConn;
 
@@ -348,12 +309,7 @@ SmsConn smsConn;
 
 
 void
-SmsReturnProperties (smsConn, numProps, props)
-
-SmsConn	smsConn;
-int	numProps;
-SmProp  **props;
-
+SmsReturnProperties(SmsConn smsConn, int numProps, SmProp **props)
 {
     IceConn			iceConn = smsConn->iceConn;
     int 			bytes;
@@ -378,10 +334,7 @@ SmProp  **props;
 
 
 void
-SmsCleanUp (smsConn)
-
-SmsConn smsConn;
-
+SmsCleanUp(SmsConn smsConn)
 {
     IceProtocolShutdown (smsConn->iceConn, _SmsOpcode);
 
diff --git a/src/sm_misc.c b/src/sm_misc.c
index 30c2c2d..a08b198 100644
--- a/src/sm_misc.c
+++ b/src/sm_misc.c
@@ -42,10 +42,7 @@ in this Software without prior written authorization from The Open Group.
  */
 
 void
-SmFreeProperty (prop)
-
-SmProp	*prop;
-
+SmFreeProperty(SmProp *prop)
 {
     if (prop)
     {
@@ -73,11 +70,7 @@ SmProp	*prop;
  */
 
 void
-SmFreeReasons (count, reasonMsgs)
-
-int 	count;
-char 	**reasonMsgs;
-
+SmFreeReasons(int count, char **reasonMsgs)
 {
     if (reasonMsgs)
     {
@@ -97,30 +90,21 @@ char 	**reasonMsgs;
  */
 
 int
-SmcProtocolVersion (smcConn)
-
-SmcConn smcConn;
-
+SmcProtocolVersion(SmcConn smcConn)
 {
     return (smcConn->proto_major_version);
 }
 
 
 int
-SmcProtocolRevision (smcConn)
-
-SmcConn smcConn;
-
+SmcProtocolRevision(SmcConn smcConn)
 {
     return (smcConn->proto_minor_version);
 }
 
 
 char *
-SmcVendor (smcConn)
-
-SmcConn smcConn;
-
+SmcVendor(SmcConn smcConn)
 {
     char *string = (char *) malloc (strlen (smcConn->vendor) + 1);
 
@@ -131,10 +115,7 @@ SmcConn smcConn;
 
 
 char *
-SmcRelease (smcConn)
-
-SmcConn smcConn;
-
+SmcRelease(SmcConn smcConn)
 {
     char *string = (char *) malloc (strlen (smcConn->release) + 1);
 
@@ -145,10 +126,7 @@ SmcConn smcConn;
 
 
 char *
-SmcClientID (smcConn)
-
-SmcConn smcConn;
-
+SmcClientID(SmcConn smcConn)
 {
     char *clientId = (char *) malloc (strlen (smcConn->client_id) + 1);
 
@@ -159,10 +137,7 @@ SmcConn smcConn;
 
 
 IceConn
-SmcGetIceConnection (smcConn)
-
-SmcConn smcConn;
-
+SmcGetIceConnection(SmcConn smcConn)
 {
     return (smcConn->iceConn);
 }
@@ -174,30 +149,21 @@ SmcConn smcConn;
  */
 
 int
-SmsProtocolVersion (smsConn)
-
-SmsConn smsConn;
-
+SmsProtocolVersion(SmsConn smsConn)
 {
     return (smsConn->proto_major_version);
 }
 
 
 int
-SmsProtocolRevision (smsConn)
-
-SmsConn smsConn;
-
+SmsProtocolRevision(SmsConn smsConn)
 {
     return (smsConn->proto_minor_version);
 }
 
 
 char *
-SmsClientID (smsConn)
-
-SmsConn smsConn;
-
+SmsClientID(SmsConn smsConn)
 {
     char *clientId = (char *) malloc (strlen (smsConn->client_id) + 1);
 
@@ -208,10 +174,7 @@ SmsConn smsConn;
 
 
 IceConn
-SmsGetIceConnection (smsConn)
-
-SmsConn smsConn;
-
+SmsGetIceConnection(SmsConn smsConn)
 {


Reply to: