]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_baudrate.c
ncurses 6.0 - patch 20150627
[ncurses.git] / ncurses / tinfo / lib_baudrate.c
index 1dee46c4792ae1867cd5af6d5acf2b1025a4867e..1cf5505c4fa62287a1816a38438fcb4bf3f10f70 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -49,7 +49,7 @@
  * of the indices up to B115200 fit nicely in a 'short', allowing us to retain
  * ospeed's type for compatibility.
  */
-#if NCURSES_OSPEED_COMPAT && ((defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__))
+#if NCURSES_OSPEED_COMPAT && ((defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__))
 #undef B0
 #undef B50
 #undef B75
@@ -79,7 +79,7 @@
 #undef USE_OLD_TTY
 #endif /* USE_OLD_TTY */
 
-MODULE_ID("$Id: lib_baudrate.c,v 1.35 2014/04/26 18:48:19 juergen Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.37 2015/06/14 00:34:12 tom Exp $")
 
 /*
  *     int
@@ -161,7 +161,7 @@ _nc_baudrate(int OSpeed)
     if (result == ERR) {
        if (OSpeed >= 0) {
            for (i = 0; i < SIZEOF(speeds); i++) {
-               if (speeds[i].s == OSpeed) {
+               if ((int) speeds[i].s == OSpeed) {
                    result = speeds[i].sp;
                    break;
                }