diff options
| author | Edwin Groothuis <edwin@FreeBSD.org> | 2002-11-19 01:40:28 +0000 |
|---|---|---|
| committer | Edwin Groothuis <edwin@FreeBSD.org> | 2002-11-19 01:40:28 +0000 |
| commit | 2ef72abedc48488b5552aa7cae0e10641ae3cdd3 (patch) | |
| tree | b8aaa96e9c24dcdd0a3d294cbea4d09ca2aeb80b /devel/picprog/files/patch-picport.cc | |
| parent | Put a real description in pkg-descr by copying the author's excellent (diff) | |
Make devel/picprog compiling under -current again.
Noticed on: bento
Diffstat (limited to 'devel/picprog/files/patch-picport.cc')
| -rw-r--r-- | devel/picprog/files/patch-picport.cc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/devel/picprog/files/patch-picport.cc b/devel/picprog/files/patch-picport.cc new file mode 100644 index 000000000000..e67dad68d882 --- /dev/null +++ b/devel/picprog/files/patch-picport.cc @@ -0,0 +1,61 @@ +--- picport.cc.orig Tue Nov 19 12:32:20 2002 ++++ picport.cc Tue Nov 19 12:33:13 2002 +@@ -28,7 +28,7 @@ + + */ + +-#include <iostream.h> ++#include <iostream> + #include <sys/ioctl.h> + #include <fcntl.h> + #include <errno.h> +@@ -47,7 +47,7 @@ + { + if (0 > (fd = open (tty, O_RDWR))) { + int e = errno; +- cerr << "Unable to open tty " << tty << ":" << strerror (e) << "\n"; ++ std::cerr << "Unable to open tty " << tty << ":" << strerror (e) << "\n"; + exit (EX_IOERR); + } + tcgetattr (fd, &saved); +@@ -67,7 +67,7 @@ + || 0 > ioctl (fd, TIOCMBIC, &picport::dtr_bit)) { + int e = errno; + tcsetattr (fd, TCSANOW, &saved); +- cerr << "Unable to clear RTS/DTR on tty " << tty << ":" << strerror (e) << "\n"; ++ std::cerr << "Unable to clear RTS/DTR on tty " << tty << ":" << strerror (e) << "\n"; + exit (EX_IOERR); + } + usleep (50000); +@@ -75,7 +75,7 @@ + int e = errno; + ioctl (fd, TIOCCBRK, 0); + tcsetattr (fd, TCSANOW, &saved); +- cerr << "Unable to start break on tty " << tty << ":" << strerror (e) << "\n"; ++ std::cerr << "Unable to start break on tty " << tty << ":" << strerror (e) << "\n"; + exit (EX_IOERR); + } + usleep (1); +@@ -182,7 +182,7 @@ + + // -1 == error, no programmer present + +-int picport::command (enum commands comm, int data = 0) ++int picport::command (enum commands comm, int data) + { + int tmp1, tmp2; + +@@ -216,11 +216,11 @@ + // This detects if the programmer is not connected to the port. + + if (!tmp1 || !tmp2) { +- cerr << portname << ":PIC programmer or chip fault\n"; ++ std::cerr << portname << ":PIC programmer or chip fault\n"; + return -1; + } + if (data_from_data == comm && (shift & 0x3f00) != 0x3f00) { +- cerr << portname ++ std::cerr << portname + << ":PIC programmer or chip fault\n" + "Is code protection enabled? " + "Use --erase option to disable code protection.\n"; |
