123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- --- digitemp-3.6.0.orig/src/digitemp.c 2008-08-28 06:42:48.000000000 +0200
- +++ digitemp-3.6.0/src/digitemp.c 2009-06-12 21:29:17.000000000 +0200
- @@ -62,9 +62,7 @@
- #include <stdlib.h>
- #include <ctype.h>
- #include <unistd.h>
- -#if !defined(AIX) && !defined(SOLARIS) && !defined(FREEBSD) && !defined(DARWIN)
- #include <getopt.h>
- -#endif /* !AIX and !SOLARIS and !FREEBSD and !DARWIN */
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/time.h>
- @@ -75,24 +73,11 @@
- #include <stdint.h>
- #include "ad26.h"
-
- -// Include endian.h
- -#if DARWIN
- -#include <machine/endian.h>
- -#endif
- -#if FREEBSD
- -#include <sys/endian.h>
- -#endif
- -#if !defined(DARWIN) && !defined(FREEBSD)
- -#include <endian.h>
- -#endif
- -
- -#ifdef LINUX
- #ifndef OWUSB
- #ifdef LOCKDEV
- #include <lockdev.h>
- #endif
- #endif
- -#endif
-
- #include "digitemp.h"
- #include "device_name.h"
- @@ -101,51 +86,8 @@
-
-
- /* Setup the correct getopt starting point */
- -#ifdef LINUX
- #define GETOPTEOF -1
- #define OPTINDSTART 0
- -#endif
- -
- -#ifdef CYGWIN
- -#define GETOPTEOF -1
- -#define OPTINDSTART 0
- -#endif
- -
- -#ifdef AIX
- -#define OPTINDSTART 0
- -#define GETOPTEOF 255
- -#endif
- -
- -#ifdef SOLARIS
- -#define GETOPTEOF EOF
- -#define OPTINDSTART 1
- -#endif
- -
- -#ifdef FREEBSD
- -#define GETOPTEOF EOF
- -#define OPTINDSTART 1
- -#endif
- -
- -#ifdef OPENBSD
- -#define GETOPTEOF EOF
- -#define OPTINDSTART 1
- -#endif
- -
- -#ifdef NETBSD
- -#define GETOPTEOF EOF
- -#define OPTINDSTART 1
- -#endif
- -
- -#ifdef DARWIN
- -#define GETOPTEOF EOF
- -#define OPTINDSTART 1
- -#endif
- -
- -#ifdef OTHER
- -#define GETOPTEOF EOF
- -#define OPTINDSTART 1
- -#endif
- -
-
- /* For tracking down strange errors */
- #undef BCL_DEBUG
- @@ -153,10 +95,6 @@
- extern char *optarg;
- extern int optind, opterr, optopt;
-
- -#if defined(FREEBSD) || defined(DARWIN)
- -extern int optreset;
- -#endif /* FREEBSD or DARWIN */
- -
- extern const char dtlib[]; /* Library Used */
-
- char serial_port[40], /* Path to the serial port */
- @@ -1928,7 +1866,7 @@ int Walk1Wire()
- struct _roms coupler_list; /* Attached Roms */
- int x;
-
- - bzero( &coupler_list, sizeof( struct _roms ) );
- + memset( &coupler_list, 0, sizeof( struct _roms ) );
-
- /* Find any DS2409 Couplers and turn them all off.
- This WILL NOT WORK if there is a coupler attached to the
- @@ -2427,7 +2365,7 @@ int main( int argc, char *argv[] )
-
-
- /* Make sure the structure is erased */
- - bzero( &sensor_list, sizeof( struct _roms ) );
- + memset( &sensor_list, 0, sizeof( struct _roms ) );
-
-
- if( argc <= 1 )
|