Library Problem With IDE V1.5.1r2 And Due

The call to avr/io.h was shown in the compiler error statement as coming from line 25 in twi.c. I added my work-around using the SAM3X8E trick just assuming that sam/pio.h was the equivalent. However, the trick partially worked but sam/pio.h was not found. There are going to be a lot of hardware discrepancies where AVR calls don't work. Since I don't know what the Due equivalent will be, I'll just have to wait until someone else sorts this problem out satisfactorily. There is also a problem with paths in the IDE. When I supply the absolute path to a .H file, it still says it can't find it. Maybe a sketch won't work because it's AVR specific but it should at least find it. All of the #include errors are coming from within included libraries and not my sketch. Some of the substitute files for the Due haven't been created yet so I'm at a stand-still. I'll continue with the Mega and watch the forum for future progress.

Thanks for the help from all contributors.