Preprocessor related fix-ups.

- olimex.c, rf2500.c, uif.c:
    add missing includes for malloc(), free() and atoi().
  - uif.c: define serial port speeds based on need, not platform.
  - uif.c: if !__linux__, stub open_olimex_iso() is not needed.
This commit is contained in:
Tamas TEVESZ 2011-07-25 16:46:26 +02:00 committed by Daniel Beer
parent 49ed2bb990
commit ea0c4d6720
4 changed files with 6 additions and 8 deletions

View File

@ -18,6 +18,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <usb.h>

View File

@ -17,6 +17,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <usb.h>

11
uif.c
View File

@ -36,8 +36,10 @@
#include "util.h"
#include "output.h"
#if defined(__APPLE__) || defined(__OpenBSD__)
#ifndef B460800
#define B460800 460800
#endif
#ifndef B500000
#define B500000 500000
#endif
@ -116,13 +118,6 @@ static int open_olimex_iso(const char *device)
return fd;
}
#else
static int open_olimex_iso(const char *device)
{
printc_err("open_olimex_iso: this driver is only supported on "
"Linux\n");
return -1;
}
#endif
transport_t uif_open(const char *device, uif_type_t type)

View File

@ -17,6 +17,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "usbutil.h"
#include "util.h"