Blame Flush.c

rpm-build 34167a
/*
rpm-build 34167a
Copyright 1989, 1998  The Open Group
rpm-build 34167a
rpm-build 34167a
Permission to use, copy, modify, distribute, and sell this software and its
rpm-build 34167a
documentation for any purpose is hereby granted without fee, provided that
rpm-build 34167a
the above copyright notice appear in all copies and that both that
rpm-build 34167a
copyright notice and this permission notice appear in supporting
rpm-build 34167a
documentation.
rpm-build 34167a
rpm-build 34167a
The above copyright notice and this permission notice shall be included in
rpm-build 34167a
all copies or substantial portions of the Software.
rpm-build 34167a
rpm-build 34167a
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
rpm-build 34167a
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
rpm-build 34167a
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
rpm-build 34167a
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
rpm-build 34167a
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
rpm-build 34167a
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
rpm-build 34167a
rpm-build 34167a
Except as contained in this notice, the name of The Open Group shall not be
rpm-build 34167a
used in advertising or otherwise to promote the sale, use or other dealings
rpm-build 34167a
in this Software without prior written authorization from The Open Group.
rpm-build 34167a
 * *
rpm-build 34167a
 * Author:  Keith Packard, MIT X Consortium
rpm-build 34167a
 */
rpm-build 34167a
rpm-build 34167a
#ifdef WIN32
rpm-build 34167a
#define _WILLWINSOCK_
rpm-build 34167a
#endif
rpm-build 34167a
#ifdef HAVE_CONFIG_H
rpm-build 34167a
#include <config.h>
rpm-build 34167a
#endif
rpm-build 34167a
#include <X11/Xos.h>
rpm-build 34167a
#include <X11/X.h>
rpm-build 34167a
#include <X11/Xmd.h>
rpm-build 34167a
#include <X11/Xdmcp.h>
rpm-build 34167a
rpm-build 34167a
#ifdef WIN32
rpm-build 34167a
#include <X11/Xwinsock.h>
rpm-build 34167a
#else
rpm-build 34167a
#include <sys/socket.h>
rpm-build 34167a
#endif
rpm-build 34167a
rpm-build 34167a
int
rpm-build 34167a
XdmcpFlush (int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen)
rpm-build 34167a
{
rpm-build 34167a
    int result;
rpm-build 34167a
    result = sendto (fd, (char *)buffer->data, buffer->pointer, 0,
rpm-build 34167a
		     (struct sockaddr *)to, tolen);
rpm-build 34167a
    if (result != buffer->pointer)
rpm-build 34167a
	return FALSE;
rpm-build 34167a
    return TRUE;
rpm-build 34167a
}