summaryrefslogtreecommitdiff
path: root/lib/libXmu/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2024-07-09 10:52:45 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2024-07-09 10:52:45 +0000
commit8e2c6d9a25ee2f19fb1ba591af4a08140632eee4 (patch)
tree6ab46e0d0b048b6efc1aa700943105f9badcc106 /lib/libXmu/src
parent7b545d1468735b1d39702c0d020c7bbead0f18ff (diff)
Update libXmu to 1.2.1
Diffstat (limited to 'lib/libXmu/src')
-rw-r--r--lib/libXmu/src/Clip.c2
-rw-r--r--lib/libXmu/src/CvtStdSel.c19
-rw-r--r--lib/libXmu/src/Makefile.am2
-rw-r--r--lib/libXmu/src/Makefile.in6
-rw-r--r--lib/libXmu/src/RdBitF.c8
5 files changed, 15 insertions, 22 deletions
diff --git a/lib/libXmu/src/Clip.c b/lib/libXmu/src/Clip.c
index ae9e13204..d670d0b64 100644
--- a/lib/libXmu/src/Clip.c
+++ b/lib/libXmu/src/Clip.c
@@ -849,7 +849,6 @@ XmuScanlineNot(XmuScanline *scanline, int minx, int maxx)
}
-#ifndef notdef
/*
* Function:
* XmuScanlineOrSegment
@@ -1116,7 +1115,6 @@ XmuScanlineXorSegment(XmuScanline *dst, XmuSegment *src)
return (dst);
}
-#endif /* notdef */
/*
* Function:
diff --git a/lib/libXmu/src/CvtStdSel.c b/lib/libXmu/src/CvtStdSel.c
index 8a1b05db6..6dfe7ca9f 100644
--- a/lib/libXmu/src/CvtStdSel.c
+++ b/lib/libXmu/src/CvtStdSel.c
@@ -47,12 +47,7 @@ in this Software without prior written authorization from The Open Group.
#ifdef WIN32
#include <X11/Xwinsock.h>
#else
-#ifndef Lynx
#include <sys/socket.h>
-#else
-#include <sys/types.h>
-#include <socket.h>
-#endif
#define XOS_USE_XT_LOCKING
#endif
#include <X11/Xos_r.h>
@@ -99,16 +94,8 @@ get_os_name(void)
if (uname (&utss) >= 0) {
char *os_name;
- int len = strlen(utss.sysname) + 1;
-#ifndef hpux /* because of hostname length crock */
- len += 2 + strlen(utss.release);
-#endif
- os_name = XtMalloc (len);
- strcpy (os_name, utss.sysname);
-#ifndef hpux
- strcat (os_name, " ");
- strcat (os_name, utss.release);
-#endif
+
+ XtAsprintf(&os_name, "%s %s", utss.sysname, utss.release);
return os_name;
}
#endif
@@ -136,7 +123,7 @@ get_os_name(void)
}
#endif
-#if !defined(SYSV) && (defined(CSRG_BASED) || defined(unix))
+#ifdef CSRG_BASED
return XtNewString("BSD");
#else
return NULL;
diff --git a/lib/libXmu/src/Makefile.am b/lib/libXmu/src/Makefile.am
index b0652f73c..5b7791e11 100644
--- a/lib/libXmu/src/Makefile.am
+++ b/lib/libXmu/src/Makefile.am
@@ -5,7 +5,7 @@ BITMAP_DEFINES = -DBITMAPDIR=\"$(includedir)/X11/bitmaps\"
AM_CPPFLAGS = \
-I${top_srcdir}/include \
-I${top_srcdir}/include/X11/Xmu \
- $(BITMAP_DEFINES) -D_CONST_X_STRING -D_BSD_SOURCE
+ $(BITMAP_DEFINES) -D_CONST_X_STRING
AM_CFLAGS = $(CWARNFLAGS) $(XMU_CFLAGS)
diff --git a/lib/libXmu/src/Makefile.in b/lib/libXmu/src/Makefile.in
index 5e65ceca8..7d91b8d41 100644
--- a/lib/libXmu/src/Makefile.in
+++ b/lib/libXmu/src/Makefile.in
@@ -181,7 +181,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
-CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -201,6 +200,8 @@ FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
FOP = @FOP@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
@@ -259,6 +260,7 @@ XMUU_CFLAGS = @XMUU_CFLAGS@
XMUU_LIBS = @XMUU_LIBS@
XMU_CFLAGS = @XMU_CFLAGS@
XMU_LIBS = @XMU_LIBS@
+XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@
@@ -321,7 +323,7 @@ BITMAP_DEFINES = -DBITMAPDIR=\"$(includedir)/X11/bitmaps\"
AM_CPPFLAGS = \
-I${top_srcdir}/include \
-I${top_srcdir}/include/X11/Xmu \
- $(BITMAP_DEFINES) -D_CONST_X_STRING -D_BSD_SOURCE
+ $(BITMAP_DEFINES) -D_CONST_X_STRING
AM_CFLAGS = $(CWARNFLAGS) $(XMU_CFLAGS)
libXmu_la_LDFLAGS = -version-number 6:2:0 -no-undefined
diff --git a/lib/libXmu/src/RdBitF.c b/lib/libXmu/src/RdBitF.c
index df379c5a7..eb608449a 100644
--- a/lib/libXmu/src/RdBitF.c
+++ b/lib/libXmu/src/RdBitF.c
@@ -59,6 +59,12 @@ in this Software without prior written authorization from The Open Group.
#include <direct.h> /* for _getdrives() */
#endif
+#ifdef O_CLOEXEC
+#define FOPEN_CLOEXEC "e"
+#else
+#define FOPEN_CLOEXEC ""
+#endif
+
#define MAX_SIZE 255
/*
@@ -384,7 +390,7 @@ XmuReadBitmapDataFromFile(_Xconst char *filename, unsigned int *width,
FILE *fstream;
int status;
- if ((fstream = fopen_file (filename, "r")) == NULL) {
+ if ((fstream = fopen_file (filename, "r" FOPEN_CLOEXEC)) == NULL) {
return BitmapOpenFailed;
}
status = XmuReadBitmapData(fstream, width, height, datap, x_hot, y_hot);