[Rxtx] Which Java folder in source?
Adrian Crum
adrian.crum at sandglass-software.com
Tue Mar 1 09:55:29 MST 2011
That code duplicates what is in Dispatcher.cpp. A Unix port would only
need to implement CommPortFactory::getInstance(portName, portType).
-Adrian
On 3/1/2011 4:37 AM, iqzw2r602 at sneakemail.com wrote:
> JNIEXPORT jint JNICALL Java_name_pachler_nio_file_impl_Unix_open
> (JNIEnv* env, jclass, jstring jpathname, jint flags, jint mode)
> {
> const char* pathname = env->GetStringUTFChars(jpathname, 0);
> if(pathname == 0)
> return -1; // java throws an out of memory error in this case
> int result = open(pathname, flags, mode);
> Unix_cacheErrno(); // handle interference between JVM and errno;
> env->ReleaseStringUTFChars(jpathname, pathname);
> return result;
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qbang.org/pipermail/rxtx/attachments/20110301/216a752b/attachment-0488.htm>
More information about the Rxtx
mailing list