]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - rt/tst-mqueue1.c
alloc_buffer: Return unqualified pointer type in alloc_buffer_next
[thirdparty/glibc.git] / rt / tst-mqueue1.c
index 9c5d940f9914abb3a19df78c6107413abafa9b5f..fb8d2e2ff0456a52f85811d483cb33a5740d20ff 100644 (file)
@@ -1,5 +1,5 @@
 /* Test message queue passing.
-   Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2004-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
 
@@ -14,9 +14,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -27,6 +26,7 @@
 #include <sys/wait.h>
 #include <time.h>
 #include <unistd.h>
+#include <stdint.h>
 #include "tst-mqueue.h"
 
 static int
@@ -47,20 +47,21 @@ check_attrs (struct mq_attr *attr, int nonblock, long cnt)
   if (attr->mq_maxmsg != 10 || attr->mq_msgsize != 1)
     {
       printf ("attributes don't match those passed to mq_open\n"
-             "mq_maxmsg %ld, mq_msgsize %ld\n",
-             attr->mq_maxmsg, attr->mq_msgsize);
+             "mq_maxmsg %jd, mq_msgsize %jd\n",
+             (intmax_t) attr->mq_maxmsg, (intmax_t) attr->mq_msgsize);
       result = 1;
     }
 
   if ((attr->mq_flags & O_NONBLOCK) != nonblock)
     {
-      printf ("mq_flags %lx != %x\n", (attr->mq_flags & O_NONBLOCK), nonblock);
+      printf ("mq_flags %jx != %x\n",
+             (intmax_t) (attr->mq_flags & O_NONBLOCK), nonblock);
       result = 1;
     }
 
   if (attr->mq_curmsgs != cnt)
     {
-      printf ("mq_curmsgs %ld != %ld\n", attr->mq_curmsgs, cnt);
+      printf ("mq_curmsgs %jd != %ld\n", (intmax_t) attr->mq_curmsgs, cnt);
       result = 1;
     }