Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: device/serial/serial_io_handler_posix.cc

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/serial/serial_io_handler_posix.h" 5 #include "device/serial/serial_io_handler_posix.h"
6 6
7 #include <sys/ioctl.h> 7 #include <sys/ioctl.h>
8 #include <termios.h> 8 #include <termios.h>
9 9
10 #include "base/posix/eintr_wrapper.h" 10 #include "base/posix/eintr_wrapper.h"
11 #include "build/build_config.h"
11 12
12 #if defined(OS_LINUX) 13 #if defined(OS_LINUX)
13 #include <linux/serial.h> 14 #include <linux/serial.h>
14 15
15 // The definition of struct termios2 is copied from asm-generic/termbits.h 16 // The definition of struct termios2 is copied from asm-generic/termbits.h
16 // because including that header directly conflicts with termios.h. 17 // because including that header directly conflicts with termios.h.
17 extern "C" { 18 extern "C" {
18 struct termios2 { 19 struct termios2 {
19 tcflag_t c_iflag; // input mode flags 20 tcflag_t c_iflag; // input mode flags
20 tcflag_t c_oflag; // output mode flags 21 tcflag_t c_oflag; // output mode flags
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 memcpy(buffer, chars_stashed_, std::min(new_bytes_read, 2)); 612 memcpy(buffer, chars_stashed_, std::min(new_bytes_read, 2));
612 memcpy(chars_stashed_, tmp, num_chars_stashed_); 613 memcpy(chars_stashed_, tmp, num_chars_stashed_);
613 return new_bytes_read; 614 return new_bytes_read;
614 } 615 }
615 616
616 std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) { 617 std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) {
617 return port_name; 618 return port_name;
618 } 619 }
619 620
620 } // namespace device 621 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/serial_io_handler_posix.h ('k') | device/serial/serial_io_handler_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698